@@ -322,11 +322,15 @@ void main() {
322322 });
323323
324324 group ('updateUserSetting' , () {
325- final body = UserSettingBody .fromJson (
325+ final bodyOverride = UserSettingBody .fromJson (
326326 json.decode (
327327 fixture ('user_setting_body.json' ),
328328 ),
329329 );
330+ final bodyOverrideNull = UserSettingBody (
331+ data: [],
332+ isOverrideBlurScreenshot: null ,
333+ );
330334 const tPathResponse = 'general_response.json' ;
331335 const tResponse = true ;
332336
@@ -350,7 +354,8 @@ void main() {
350354 setUpMockDioSuccess ();
351355
352356 // act
353- await remoteDataSource.updateUserSetting (body);
357+ await remoteDataSource.updateUserSetting (bodyOverride);
358+ await remoteDataSource.updateUserSetting (bodyOverrideNull);
354359
355360 // assert
356361 verify (mockDio.post ('$baseUrl /user' , data: anyNamed ('data' ), options: anyNamed ('options' )));
@@ -365,7 +370,7 @@ void main() {
365370 setUpMockDioSuccess ();
366371
367372 // act
368- final result = await remoteDataSource.updateUserSetting (body );
373+ final result = await remoteDataSource.updateUserSetting (bodyOverride );
369374
370375 // assert
371376 expect (result, tResponse);
@@ -384,7 +389,7 @@ void main() {
384389 when (mockDio.post (any, data: anyNamed ('data' ), options: anyNamed ('options' ))).thenAnswer ((_) async => response);
385390
386391 // act
387- final call = remoteDataSource.updateUserSetting (body );
392+ final call = remoteDataSource.updateUserSetting (bodyOverride );
388393
389394 // assert
390395 expect (() => call, throwsA (const TypeMatcher <DioException >()));
0 commit comments