Skip to content

Commit 86c7a17

Browse files
committed
test: verify LiveQuery master key query
1 parent 22c066a commit 86c7a17

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

spec/ParseLiveQueryQuery.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ describe('ParseLiveQuery query operation', function () {
255255
);
256256
subscription.query = undefined;
257257
const withJSON = spyOn(Parse.Query.prototype, 'withJSON').and.callThrough();
258-
spyOn(Parse.Query.prototype, 'find').and.resolveTo([]);
258+
const find = spyOn(Parse.Query.prototype, 'find').and.resolveTo([]);
259259

260260
await parseLiveQueryServer._handleQuery(parseWebSocket, {
261261
op: 'query',
@@ -265,6 +265,7 @@ describe('ParseLiveQuery query operation', function () {
265265
const Client = require('../lib/LiveQuery/Client').Client;
266266
expect(Client.pushError.calls.allArgs()).toEqual([]);
267267
expect(withJSON).toHaveBeenCalledWith({ where: {} });
268+
expect(find).toHaveBeenCalledWith({ useMasterKey: true });
268269
expect(client.pushResult).toHaveBeenCalledWith(requestId, []);
269270
});
270271

0 commit comments

Comments
 (0)