Merge pull request #3 from codegefluester/test_for_calling_nonexisting_cf
Test for calling non-existing Cloud Function
This commit is contained in:
@@ -676,4 +676,15 @@ describe('miscellaneous', function() {
|
||||
});
|
||||
});
|
||||
|
||||
it('fails on invalid function', done => {
|
||||
Parse.Cloud.run('somethingThatDoesDefinitelyNotExist').then((s) => {
|
||||
fail('This should have never suceeded');
|
||||
done();
|
||||
}, (e) => {
|
||||
expect(e.code).toEqual(Parse.Error.SCRIPT_FAILED);
|
||||
expect(e.message).toEqual('Invalid function.');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user