From 2948304df1e5207e849611265a381fda50fd45ca Mon Sep 17 00:00:00 2001 From: Tobe O Date: Wed, 9 Oct 2019 12:20:45 -0400 Subject: [PATCH] hasOne false subquery test --- angel_orm_test/lib/src/has_one_test.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/angel_orm_test/lib/src/has_one_test.dart b/angel_orm_test/lib/src/has_one_test.dart index ba1abe0a..9daeb169 100644 --- a/angel_orm_test/lib/src/has_one_test.dart +++ b/angel_orm_test/lib/src/has_one_test.dart @@ -85,4 +85,12 @@ hasOneTests(FutureOr Function() createExecutor, expect(leg.foot.id, foot.id); expect(leg.foot.nToes, foot.nToes); }); + + test('sets null on false subquery', () async { + var legQuery = new LegQuery() + ..where.id.equals(originalLeg.idAsInt) + ..foot.where.legId.equals(originalLeg.idAsInt + 1024); + var leg = await legQuery.getOne(executor); + expect(leg.foot, isNull); + }); }