Skip to content

Commit 9af8d6c

Browse files
authored
Restore find() method in spy
1 parent 3186bf9 commit 9af8d6c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

spec/ParseLiveQueryServer.spec.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,6 +1295,18 @@ describe('ParseLiveQueryServer', function() {
12951295
shouldReturn = false;
12961296
return this;
12971297
},
1298+
find() {
1299+
if (!shouldReturn) {
1300+
return Promise.resolve([]);
1301+
}
1302+
//Return a role with the name "liveQueryRead" as that is what was set on the ACL
1303+
const liveQueryRole = new Parse.Role(
1304+
'liveQueryRead',
1305+
new Parse.ACL()
1306+
);
1307+
liveQueryRole.id = 'abcdef1234';
1308+
return Promise.resolve([liveQueryRole]);
1309+
},
12981310
each(callback) {
12991311
//Return a role with the name "liveQueryRead" as that is what was set on the ACL
13001312
const liveQueryRole = new Parse.Role(

0 commit comments

Comments
 (0)