Created
March 5, 2014 16:13
-
-
Save lorenzoplanas/9370333 to your computer and use it in GitHub Desktop.
Login spec
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("renders an error message if credentials incorrect", function() { | |
loginPresenter.render(); | |
loginPresenter.listen(); | |
expect($(".error", loginPresenter.$el).length).toBe(0); | |
$("input[name='email']", loginPresenter.$el).val("wrong"); | |
$("input[name='email']", loginPresenter.$el).val("wrong"); | |
$("form", loginPresenter.$el).trigger("submit"); | |
expect($(".error", loginPresenter.$el).length).toBe(0); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment