Skip to content

Commit 5420c38

Browse files
Merge pull request parse-community#3 from codegefluester/test_for_calling_nonexisting_cf
Test for calling non-existing Cloud Function
2 parents 6adffb0 + 4822d2b commit 5420c38

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

spec/ParseAPI.spec.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,4 +676,15 @@ describe('miscellaneous', function() {
676676
});
677677
});
678678

679+
it('fails on invalid function', done => {
680+
Parse.Cloud.run('somethingThatDoesDefinitelyNotExist').then((s) => {
681+
fail('This should have never suceeded');
682+
done();
683+
}, (e) => {
684+
expect(e.code).toEqual(Parse.Error.SCRIPT_FAILED);
685+
expect(e.message).toEqual('Invalid function.');
686+
done();
687+
});
688+
});
689+
679690
});

0 commit comments

Comments
 (0)