fix: alot
This commit is contained in:
@@ -171,7 +171,7 @@ void main() {
|
||||
});
|
||||
|
||||
group('deleteProduct', () {
|
||||
test('removes product from database', () async {
|
||||
test('hides the product but keeps its row', () async {
|
||||
await database
|
||||
.into(database.products)
|
||||
.insert(
|
||||
@@ -187,8 +187,11 @@ void main() {
|
||||
|
||||
await service.deleteProduct('delete-test');
|
||||
|
||||
final products = await database.select(database.products).get();
|
||||
expect(products, isEmpty);
|
||||
expect(await service.getProducts(), isEmpty);
|
||||
final row = await service.getProductById('delete-test');
|
||||
expect(row!.active, isFalse);
|
||||
|
||||
await service.increaseStock('delete-test', 1);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user