Skip to content

Instantly share code, notes, and snippets.

@woods
Created March 17, 2009 14:29
Show Gist options
  • Save woods/80564 to your computer and use it in GitHub Desktop.
Save woods/80564 to your computer and use it in GitHub Desktop.
Feature: Session management
In order to access the back end of the site,
the Admins and Editors
want to be able to log in and log out.
Scenario: Successful admin log in
Given there is a user named "admin" with password "admin"
And I am on the log in page
When I fill in "Login" with "admin"
And I fill in "Password" with "admin"
And I press "Log In"
Then I should see the bus list page
And there should be no errors
Scenario: Failed admin login
Given there is a user named "admin" with password "admin"
And I am on the log in page
When I fill in "Login" with "admin"
And I fill in "Password" with "bad password"
And I press "Log In"
Then I should see the log in page
And I should see an error message
Scenario: Log out
Given I am logged in as an Admin
And I am on the bus list page
When I click "Log Out"
Then I should see the home page
And I should see a success message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment