Skip to content

Commit

Permalink
add when() to allow put
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan-tbd committed Aug 13, 2024
1 parent ef18e74 commit 6bde4f9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/features/feature_flags/feature_flags_notifier_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ void main() {
when(() => mockBox.get(FeatureFlagsNotifier.storageKey)).thenReturn(
initialFeatureFlags.map((flag) => flag.toJson()).toList(),
);
when(
() => mockBox.put(
FeatureFlagsNotifier.storageKey,
any<List<Map<String, dynamic>>>(),
),
).thenAnswer((_) async {});

final notifier = await FeatureFlagsNotifier.create(mockBox);

expect(notifier.state, initialFeatureFlags);
Expand Down

0 comments on commit 6bde4f9

Please sign in to comment.