Added test for proper handling of trying to call a non-existing Cloud Function

This commit is contained in:
Björn Kaiser
2016-02-03 21:21:30 +00:00
parent 4ddedf852a
commit 035fcd2615

View File

@@ -648,4 +648,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();
});
});
});