Matching queries with doesNotExist constraint

This commit is contained in:
André Luiz Cardoso
2016-03-29 11:28:45 -03:00
parent 592334756b
commit 3dccd61222
2 changed files with 17 additions and 1 deletions

View File

@@ -112,6 +112,20 @@ describe('matchesQuery', function() {
expect(matchesQuery(obj, q)).toBe(false);
});
it('matches queries with doesNotExist constraint', function() {
var obj = {
id: new Id('Item', 'O1'),
count: 15
};
var q = new Parse.Query('Item');
q.doesNotExist('name');
expect(matchesQuery(obj, q)).toBe(true);
q = new Parse.Query('Item');
q.doesNotExist('count');
expect(matchesQuery(obj, q)).toBe(false);
});
it('matches on equality queries', function() {
var day = new Date();
var location = new Parse.GeoPoint({