From ee54aed1f3ae9928c71ef8f22c786469f63544df Mon Sep 17 00:00:00 2001 From: Vadim Date: Sun, 9 Jul 2023 12:58:43 +0200 Subject: [PATCH] fixed tests --- .../light_sensor/bloc_container_light_sensor_test.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/screens/metering/components/light_sensor/bloc_container_light_sensor_test.dart b/test/screens/metering/components/light_sensor/bloc_container_light_sensor_test.dart index dc1e470..70dd31d 100644 --- a/test/screens/metering/components/light_sensor/bloc_container_light_sensor_test.dart +++ b/test/screens/metering/components/light_sensor/bloc_container_light_sensor_test.dart @@ -117,6 +117,7 @@ void main() { bloc.onCommunicationState(const communication_states.MeasureState()); await Future.delayed(Duration.zero); bloc.onCommunicationState(const communication_states.SettingsOpenedState()); + bloc.onCommunicationState(const communication_states.SettingsClosedState()); }, verify: (_) { verify(() => meteringInteractor.luxStream().listen((_) {})).called(1); @@ -132,7 +133,7 @@ void main() { }).called(1); verify(() { communicationBloc.add(communication_events.MeteringEndedEvent(resultList.last)); - }).called(2); // +1 from dispose + }).called(3); // +1 from settings closed, +1 from dispose }, expect: () => resultList.map( (e) => isA().having((state) => state.ev100, 'ev100', e),