fixes before build
This commit is contained in:
@@ -52,6 +52,25 @@ void main() {
|
||||
});
|
||||
});
|
||||
|
||||
test('getLastTripSupermarkets lists unique stores newest first', () async {
|
||||
final repository = memoryRepository();
|
||||
await repository.saveShop(
|
||||
supermarket: 'Jumbo',
|
||||
shoppedAt: DateTime(2026, 8, 1),
|
||||
items: [LineItem(id: '1', name: 'Milk', price: 1.5)],
|
||||
);
|
||||
await repository.saveShop(
|
||||
supermarket: 'Albert Heijn',
|
||||
shoppedAt: DateTime(2026, 8, 12),
|
||||
items: [LineItem(id: '2', name: 'Bread', price: 2)],
|
||||
);
|
||||
|
||||
expect(await repository.getLastTripSupermarkets(), [
|
||||
'Albert Heijn',
|
||||
'Jumbo',
|
||||
]);
|
||||
});
|
||||
|
||||
test('deleting all products leaves shopping trips in place', () async {
|
||||
final repository = memoryRepository();
|
||||
await repository.saveShop(
|
||||
|
||||
Reference in New Issue
Block a user