fixing equals on array columns in live query (#3089)

This commit is contained in:
David Poetzsch-Heffter
2016-11-25 02:42:53 +01:00
committed by Florent Vilmart
parent d800ff85e2
commit 8f1c1f419b
2 changed files with 39 additions and 15 deletions

View File

@@ -226,6 +226,23 @@ describe('matchesQuery', function() {
img.owner.objectId = 'U3';
expect(matchesQuery(img, q)).toBe(false);
// pointers in arrays
q = new Parse.Query('Image');
q.equalTo('owners', u);
img = {
className: 'Image',
objectId: 'I1',
owners: [{
className: '_User',
objectId: 'U2'
}]
};
expect(matchesQuery(img, q)).toBe(true);
img.owners[0].objectId = 'U3';
expect(matchesQuery(img, q)).toBe(false);
});
it('matches on inequalities', function() {