Created
August 25, 2009 23:41
-
-
Save bitbckt/175130 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
Feature: Log in | |
In order to get access to protected sections of the site | |
A user | |
Should be able to log in | |
Scenario: User is not signed up | |
Given no user exists with a login of "admin" | |
When I go to the log in page | |
And I log in with "admin/password" | |
Then I should see "Bad login or password" | |
And I should not be logged in | |
Scenario: User enters wrong password | |
Given a user exists with "admin/password" | |
When I go to the log in page | |
And I log in with "admin/wrongpassword" | |
Then I should see "Bad login or password" | |
And I should not be logged in | |
Scenario: User logs in successfully | |
Given a user exists with "admin/password" | |
When I go to the log in page | |
And I log in with "admin/password" | |
Then I should see "Logged in successfully" | |
And I should be logged in | |
And I should be on the admin dashboard page | |
Scenario: User logs in and checks "remember me" | |
Given a user exists with "admin/password" | |
When I go to the log in page | |
And I log in with "admin/password" and "remember me" | |
Then I should see "Logged in successfully" | |
And I should be logged in | |
When I return next time | |
Then I should be logged in | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment