Skip to content

Commit 4fcacbc

Browse files
committed
fix test
1 parent ad64eb2 commit 4fcacbc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/nutrition/nutritional_meal_item_form_test.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,11 @@ void main() {
305305

306306
expect(formState.ingredientIdController.text, '1');
307307

308+
// once ID and weight are set, it'll fetchIngredient and show macros preview
309+
when(mockNutrition.fetchIngredient(1)).thenAnswer((_) => Future.value(
310+
Ingredient.fromJson(jsonDecode(fixture('nutrition/ingredient_59887_response.json'))),
311+
));
312+
308313
await tester.enterText(find.byKey(const Key('field-weight')), '2');
309314
await tester.pumpAndSettle();
310315

0 commit comments

Comments
 (0)