Skip to content

Commit

Permalink
Add new product to list and update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marfavi committed Nov 9, 2023
1 parent 32d8d00 commit 8df17d8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/features/product/domain/usecases/get_all_products_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ void main() {
description: 'test',
isPerk: false,
),
ProductModel(
id: 3,
name: 'test (single perk)',
amount: 1,
price: 0,
description: 'test',
isPerk: true,
),
];

when(remoteDataSource.getProducts())
Expand All @@ -58,7 +66,8 @@ void main() {
(_) => throw Exception(),
(actual) {
expect(actual.clipCards, [products.first]);
expect(actual.singleDrinks, [products[1]]);
expect(actual.singleDrinks, [products[1], products[2]]);
expect(actual.perks, [products.last]);
},
);
},
Expand Down

0 comments on commit 8df17d8

Please sign in to comment.