From 0720cb81aa28a60466f51a8239169297c763c84f Mon Sep 17 00:00:00 2001 From: Efrain Bastidas Date: Wed, 29 Mar 2023 21:14:23 -0500 Subject: [PATCH] [Application] Only show the targetResourceVersion when an update is available --- .../check_for_resource_updates_bloc.dart | 4 +++- .../check_for_resource_updates_bloc_test.dart | 4 ++-- test/infrastructure/file/character_file_service_test.dart | 4 +--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/application/check_for_resource_updates/check_for_resource_updates_bloc.dart b/lib/application/check_for_resource_updates/check_for_resource_updates_bloc.dart index 57f145587..70bd54680 100644 --- a/lib/application/check_for_resource_updates/check_for_resource_updates_bloc.dart +++ b/lib/application/check_for_resource_updates/check_for_resource_updates_bloc.dart @@ -50,7 +50,9 @@ class CheckForResourceUpdatesBloc extends Bloc bloc ..add(const CheckForResourceUpdatesEvent.init()) ..add(const CheckForResourceUpdatesEvent.checkForUpdates()), - verify: (bloc) => checkState(bloc.state, AppResourceUpdateResultType.needsLatestAppVersion, -1, targetResourceVersion: 2), + verify: (bloc) => checkState(bloc.state, AppResourceUpdateResultType.needsLatestAppVersion, -1), ); blocTest( @@ -110,7 +110,7 @@ void main() { act: (bloc) => bloc ..add(const CheckForResourceUpdatesEvent.init()) ..add(const CheckForResourceUpdatesEvent.checkForUpdates()), - verify: (bloc) => checkState(bloc.state, AppResourceUpdateResultType.noInternetConnectionForFirstInstall, -1, targetResourceVersion: 2), + verify: (bloc) => checkState(bloc.state, AppResourceUpdateResultType.noInternetConnectionForFirstInstall, -1), ); blocTest( diff --git a/test/infrastructure/file/character_file_service_test.dart b/test/infrastructure/file/character_file_service_test.dart index 9786c7ad6..5d5a79e40 100644 --- a/test/infrastructure/file/character_file_service_test.dart +++ b/test/infrastructure/file/character_file_service_test.dart @@ -79,9 +79,7 @@ void main() { expect(detail.role, character.roleType); expect(detail.isComingSoon, character.isComingSoon); expect(detail.isNew, character.isNew); - if (detail.isComingSoon) { - expect(detail.tier, 'na'); - } else { + if (!detail.isComingSoon) { expect(detail.tier, isIn(['d', 'c', 'b', 'a', 's', 'ss', 'sss'])); }