mirror of
https://github.com/wger-project/flutter.git
synced 2026-11-29 09:20:56 +01:00
ProviderContainer.test used for automatic disposal in test
This commit is contained in:
@@ -13,7 +13,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('changing vegan filter updates provider and saves value', () async {
|
||||
final container = ProviderContainer(
|
||||
final container = ProviderContainer.test(
|
||||
overrides: [
|
||||
ingredientFiltersNotifierProvider.overrideWith(
|
||||
() => IngredientFiltersNotifier(
|
||||
@@ -25,8 +25,6 @@ void main() {
|
||||
],
|
||||
);
|
||||
|
||||
addTearDown(container.dispose);
|
||||
|
||||
await container.read(ingredientFiltersNotifierProvider.notifier).toggleVegan(true);
|
||||
|
||||
expect(
|
||||
|
||||
Reference in New Issue
Block a user