Skip to content

Instantly share code, notes, and snippets.

@jbueza
Created May 5, 2012 09:58
Show Gist options
  • Save jbueza/2601269 to your computer and use it in GitHub Desktop.
Save jbueza/2601269 to your computer and use it in GitHub Desktop.
describe("Registration", function() {
describe("register(params, callback)", function() {
it("should return false if not passing a params object", function() {
expect(registrationController.register()).toBeFalsy();
});
it("should return false if a callback is not specified", function() {
expect(registrationController.register({})).toBeFalsy();
});
it("should invoke the callback", function() {
var spy = sinon.spy();
registrationController.register({}, spy);
expect(spy.called).toBeTruthy();
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment