From 975935cffd0a92c72d519a1e3da1d68d0b7032cb Mon Sep 17 00:00:00 2001 From: Tobe O Date: Wed, 9 Oct 2019 12:18:02 -0400 Subject: [PATCH] hasMany subquery test --- angel_orm_test/lib/src/has_many_test.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/angel_orm_test/lib/src/has_many_test.dart b/angel_orm_test/lib/src/has_many_test.dart index c96add0a..17e93821 100644 --- a/angel_orm_test/lib/src/has_many_test.dart +++ b/angel_orm_test/lib/src/has_many_test.dart @@ -68,5 +68,13 @@ hasManyTests(FutureOr Function() createExecutor, var tree = await tq.deleteOne(executor); verify(tree); }); + + test('returns empty on false subquery', () async { + var tq = new TreeQuery() + ..where.id.equals(treeId) + ..fruits.where.commonName.equals('Kiwi'); + var tree = await tq.getOne(executor); + expect(tree.fruits, isEmpty); + }); }); }