Created
September 16, 2011 19:46
-
-
Save graybill/1222952 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment