fix: alot
This commit is contained in:
@@ -565,5 +565,22 @@ void main() {
|
||||
expect(closedTabs.last.customerName, 'First');
|
||||
});
|
||||
});
|
||||
|
||||
group('hidden products', () {
|
||||
test('a tab holding a deleted product can still be changed', () async {
|
||||
final tab = await service.createTab(customerName: 'John');
|
||||
await service.addProductToTab(
|
||||
tabId: tab.id,
|
||||
product: createTestProduct(),
|
||||
);
|
||||
await DriftProductService(database: database).deleteProduct('prod-1');
|
||||
|
||||
final item = (await service.getTabById(tab.id))!.items.single;
|
||||
await service.adjustTabItemQuantity(tabItemId: item.id, delta: -1);
|
||||
await service.deleteTab(tab.id);
|
||||
|
||||
expect(await service.getTabById(tab.id), isNull);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user