PG: Support for multiple projection in aggregate (#4469)
This commit is contained in:
committed by
Vitaly Tomilov
parent
6ba939994d
commit
04f8673edd
@@ -254,7 +254,8 @@ describe('Parse.Query Aggregate testing', () => {
|
||||
rp.get(Parse.serverURL + '/aggregate/TestObject', options)
|
||||
.then((resp) => {
|
||||
resp.results.forEach((result) => {
|
||||
expect(result.name !== undefined).toBe(true);
|
||||
expect(result.objectId).not.toBe(undefined);
|
||||
expect(result.name).not.toBe(undefined);
|
||||
expect(result.sender).toBe(undefined);
|
||||
expect(result.size).toBe(undefined);
|
||||
expect(result.score).toBe(undefined);
|
||||
@@ -263,6 +264,25 @@ describe('Parse.Query Aggregate testing', () => {
|
||||
}).catch(done.fail);
|
||||
});
|
||||
|
||||
it('multiple project query', (done) => {
|
||||
const options = Object.assign({}, masterKeyOptions, {
|
||||
body: {
|
||||
project: { name: 1, score: 1, sender: 1 },
|
||||
}
|
||||
});
|
||||
rp.get(Parse.serverURL + '/aggregate/TestObject', options)
|
||||
.then((resp) => {
|
||||
resp.results.forEach((result) => {
|
||||
expect(result.objectId).not.toBe(undefined);
|
||||
expect(result.name).not.toBe(undefined);
|
||||
expect(result.score).not.toBe(undefined);
|
||||
expect(result.sender).not.toBe(undefined);
|
||||
expect(result.size).toBe(undefined);
|
||||
});
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
|
||||
it('project with group query', (done) => {
|
||||
const options = Object.assign({}, masterKeyOptions, {
|
||||
body: {
|
||||
|
||||
Reference in New Issue
Block a user