From c6a6c9ac5a77530c7535a58017775328d12e5759 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Mon, 9 Nov 2020 18:24:30 +0100 Subject: [PATCH] Another tests for streams and migrations --- moor/test/join_test.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/moor/test/join_test.dart b/moor/test/join_test.dart index c5cac57f..ff0cc27a 100644 --- a/moor/test/join_test.dart +++ b/moor/test/join_test.dart @@ -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 {