Created
October 22, 2014 06:06
-
-
Save iporsut/3ed3cc10cafc4c020557 to your computer and use it in GitHub Desktop.
Jasmine 1.3 mostRecentCall
This file contains hidden or 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 call SaveOrder when click save", function() { | |
spyOn(service, "SaveOrder"); | |
var expectedArgument = { | |
id: "1", | |
items: [ | |
"item1", | |
"item2", | |
"item3" | |
] | |
}; | |
controller.onClickSaveOrder(); | |
expect(service.SaveOrder.mostRecentCall.args[0]).toEqual(expectedArgument); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment