Created
February 28, 2013 11:12
-
-
Save MandarinConLaBarba/5056009 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
describe("flows.example.splash", function() { | |
describe("steps", function() { | |
describe("login-user", function() { | |
beforeEach(function() { | |
//Get the step | |
var target = sebastian.flow("flows.example.splash").step("login-user"), | |
//Dummy up a context | |
context = { | |
user : { | |
set : sinon.stub() | |
login : sinon.stub() | |
} | |
} | |
//Call the step | |
target.callback.call(context); | |
}); | |
it("should set the userName", function() { | |
context.user.set.withArgs("userName").called.should.be.true; | |
}); | |
it("should set the password", function() { | |
context.user.set.withArgs("password").called.should.be.true; | |
}); | |
it("should call the user login method", function() { | |
context.user.login.called.should.be.true; | |
}); | |
}) | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment