Merge pull request #3 from codegefluester/test_for_calling_nonexisting_cf

Test for calling non-existing Cloud Function
This commit is contained in:
Björn Kaiser
2016-02-03 22:12:58 +00:00

View File

@@ -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();
});
});
});