Fix Aggregate Match Pointer (#4643)

This commit is contained in:
Diamond Lewis
2018-03-14 21:57:30 -05:00
committed by GitHub
parent 3acb3e7a9b
commit c36ef99368
3 changed files with 10 additions and 5 deletions

View File

@@ -13,6 +13,10 @@ const masterKeyOptions = {
json: true
}
const PointerObject = Parse.Object.extend({
className: "PointerObject"
});
const loadTestData = () => {
const data1 = {score: 10, name: 'foo', sender: {group: 'A'}, views: 900, size: ['S', 'M']};
const data2 = {score: 10, name: 'foo', sender: {group: 'A'}, views: 800, size: ['M', 'L']};
@@ -448,8 +452,8 @@ describe('Parse.Query Aggregate testing', () => {
});
it('match pointer query', (done) => {
const pointer1 = new TestObject();
const pointer2 = new TestObject();
const pointer1 = new PointerObject();
const pointer2 = new PointerObject();
const obj1 = new TestObject({ pointer: pointer1 });
const obj2 = new TestObject({ pointer: pointer2 });
const obj3 = new TestObject({ pointer: pointer1 });
@@ -618,8 +622,8 @@ describe('Parse.Query Aggregate testing', () => {
});
it('distinct pointer', (done) => {
const pointer1 = new TestObject();
const pointer2 = new TestObject();
const pointer1 = new PointerObject();
const pointer2 = new PointerObject();
const obj1 = new TestObject({ pointer: pointer1 });
const obj2 = new TestObject({ pointer: pointer2 });
const obj3 = new TestObject({ pointer: pointer1 });