hasMany subquery test

This commit is contained in:
Tobe O 2019-10-09 12:18:02 -04:00
parent b6e0dfa8c9
commit 975935cffd

View file

@ -68,5 +68,13 @@ hasManyTests(FutureOr<QueryExecutor> 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);
});
});
}