Skip to content

Commit 5266bfa

Browse files
committed
fix tests
1 parent b8ca1b1 commit 5266bfa

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

spec/DatabaseController.spec.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,11 @@ describe('DatabaseController', function () {
415415
email_1: { email: 1 },
416416
_email_verify_token: { _email_verify_token: 1 },
417417
_perishable_token: { _perishable_token: 1 },
418+
_auth_data_custom_id: { '_auth_data_custom.id': 1 },
419+
_auth_data_facebook_id: { '_auth_data_facebook.id': 1 },
420+
_auth_data_myoauth_id: { '_auth_data_myoauth.id': 1 },
421+
_auth_data_shortLivedAuth_id: { '_auth_data_shortLivedAuth.id': 1 },
422+
_auth_data_anonymous_id: { '_auth_data_anonymous.id': 1 },
418423
});
419424
}
420425
);
@@ -441,6 +446,11 @@ describe('DatabaseController', function () {
441446
email_1: { email: 1 },
442447
_email_verify_token: { _email_verify_token: 1 },
443448
_perishable_token: { _perishable_token: 1 },
449+
_auth_data_custom_id: { '_auth_data_custom.id': 1 },
450+
_auth_data_facebook_id: { '_auth_data_facebook.id': 1 },
451+
_auth_data_myoauth_id: { '_auth_data_myoauth.id': 1 },
452+
_auth_data_shortLivedAuth_id: { '_auth_data_shortLivedAuth.id': 1 },
453+
_auth_data_anonymous_id: { '_auth_data_anonymous.id': 1 },
444454
});
445455
}
446456
);

spec/ParseUser.spec.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,13 @@ describe('Parse.User testing', () => {
430430
},
431431
},
432432
};
433-
const res = await request(options);
434-
expect(res.data.objectId).not.toEqual(objectId);
433+
try {
434+
await request(options);
435+
fail('should have thrown');
436+
} catch (err) {
437+
expect(err.data.code).toBe(208);
438+
expect(err.data.error).toBe('this auth is already used');
439+
}
435440
});
436441

437442
it('user login with files', done => {

0 commit comments

Comments
 (0)