Refactor cloud code tests (#1837)

* Move cloud code tests

* Remove _removeHook calls that are no longer necessary

* Use Strict
This commit is contained in:
Drew
2016-05-19 13:38:16 -07:00
committed by Tyler Brock
parent fece2a4b47
commit b2183680be
13 changed files with 496 additions and 514 deletions

View File

@@ -696,20 +696,16 @@ describe('Parse.Relation testing', () => {
admins.first({ useMasterKey: true })
.then(user => {
if (user) {
Parse.Cloud._removeHook('Functions', 'isAdmin');
done();
} else {
Parse.Cloud._removeHook('Functions', 'isAdmin');
fail('Should have found admin user, found nothing instead');
done();
}
}, error => {
Parse.Cloud._removeHook('Functions', 'isAdmin');
fail('User not admin');
done();
})
}, error => {
Parse.Cloud._removeHook('Functions', 'isAdmin');
fail('Should have found admin user, errored instead');
fail(error);
done();