Skip to content

Commit

Permalink
fix: fix failing tests by using proper query permission
Browse files Browse the repository at this point in the history
  • Loading branch information
b10f committed Oct 2, 2023
1 parent a0ea93b commit c1a6b53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions spec/DatabaseController.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,22 +503,22 @@ describe('DatabaseController', () => {

const query = new Parse.Query(Parse.User);
query.equalTo('username', 'EXAMPLE');
const result = await query.find();
const result = await query.find({ useMasterKey: true });
expect(result.length).toEqual(0);

const query2 = new Parse.Query(Parse.User);
query2.equalTo('email', '[email protected]');
const result2 = await query2.find();
const result2 = await query2.find({ useMasterKey: true });
expect(result2.length).toEqual(0);

const query3 = new Parse.Query(Parse.User);
query3.equalTo('username', 'example');
const result3 = await query3.find();
const result3 = await query3.find({ useMasterKey: true });
expect(result3.length).toEqual(1);

const query4 = new Parse.Query(Parse.User);
query4.equalTo('email', '[email protected]');
const result4 = await query4.find();
const result4 = await query4.find({ useMasterKey: true });
expect(result4.length).toEqual(1);
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/Options/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export interface ParseServerOptions {
databaseOptions: ?DatabaseOptions;
/* Adapter module for the database; any options that are not explicitly described here are passed directly to the database client. */
databaseAdapter: ?Adapter<StorageAdapter>;
/* Disable case insensitivity (collation) on queries and indexes, needed if you use MongoDB serverless or AWS DocumentDB */
/* Disable case insensitivity (collation) on queries and indexes, needed if you use MongoDB serverless or AWS DocumentDB. */
disableCollation: ?boolean;
/* Transform Username and Email to lowercase on create/update/login/signup. On queries client needs to ensure to send Email/Username in lowercase format. */
transformEmailAndUsernameToLowerCase: ?boolean;
Expand Down

0 comments on commit c1a6b53

Please sign in to comment.