Another tests for streams and migrations

This commit is contained in:
Simon Binder 2020-11-09 18:24:30 +01:00
parent cc464c46d6
commit c6a6c9ac5a
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
1 changed files with 4 additions and 2 deletions

View File

@ -151,7 +151,7 @@ void main() {
db.markTablesUpdated({categories});
});
test('updates when any queried table changes', () {
test('updates when any queried table changes in transaction', () {
// Nonsense query, repro for https://github.com/simolus3/moor/issues/910
final a = db.users;
final b = db.categories;
@ -167,7 +167,9 @@ void main() {
final stream = query.watch();
expectLater(stream, emitsInOrder([[], []]));
db.markTablesUpdated({b});
return db.transaction(() async {
db.markTablesUpdated({b});
});
});
test('setting where multiple times forms conjunction', () async {