Skip to content

Instantly share code, notes, and snippets.

@iporsut
Created October 22, 2014 06:06
Show Gist options
  • Save iporsut/3ed3cc10cafc4c020557 to your computer and use it in GitHub Desktop.
Save iporsut/3ed3cc10cafc4c020557 to your computer and use it in GitHub Desktop.
Jasmine 1.3 mostRecentCall
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