hasOne false subquery test

This commit is contained in:
Tobe O 2019-10-09 12:20:45 -04:00
parent 975935cffd
commit 2948304df1

View file

@ -85,4 +85,12 @@ hasOneTests(FutureOr<QueryExecutor> 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);
});
}