Skip to content

Commit 383b4a1

Browse files
committed
test: Use adapter find instead of estimated count to verify installation row survival
1 parent 04b0a59 commit 383b4a1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

spec/ParseInstallation.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,8 +1345,8 @@ describe('Installations', () => {
13451345
expect(error.data.code).toBe(Parse.Error.OPERATION_FORBIDDEN);
13461346
expect(error.data.error).toBe('Permission denied');
13471347
// The row is still present: the anonymous delete did not take effect.
1348-
const remaining = await new Parse.Query(Parse.Installation).count({ useMasterKey: true });
1349-
expect(remaining).toBe(1);
1348+
const remaining = await database.adapter.find('_Installation', installationSchema, {}, {});
1349+
expect(remaining.length).toBe(1);
13501350
});
13511351

13521352
it('blocks the find operation for an authenticated non-master user', async () => {
@@ -1400,8 +1400,8 @@ describe('Installations', () => {
14001400
expect(error.data.code).toBe(Parse.Error.OPERATION_FORBIDDEN);
14011401
expect(error.data.error).toBe('Permission denied');
14021402
// The row is still present: the authenticated non-master delete did not take effect.
1403-
const remaining = await new Parse.Query(Parse.Installation).count({ useMasterKey: true });
1404-
expect(remaining).toBe(1);
1403+
const remaining = await database.adapter.find('_Installation', installationSchema, {}, {});
1404+
expect(remaining.length).toBe(1);
14051405
});
14061406
});
14071407

0 commit comments

Comments
 (0)