Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- it("should make a server request from passed options", function() {
- runs(function(){
- var options = { endPoint: '/json/admin/user',
- method: 'get_list',
- data: {},
- successCallback: function(res) {
- // can i put a spy here to make sure the callback is fired?
- console.log("SUCCESS")
- console.log(res)
- }
- };
- // Not using the spy correctly
- spyOn(options, 'successCallback');
- App.request(options);
- expect(options.successCallback).toHaveBeenCalled()
- })
- });
Add Comment
Please, Sign In to add comment