Skip to content

Instantly share code, notes, and snippets.

@kpumuk
Created December 3, 2009 16:11
Show Gist options
  • Save kpumuk/248276 to your computer and use it in GitHub Desktop.
Save kpumuk/248276 to your computer and use it in GitHub Desktop.
Feature: User login
In order to use application
As a user
I want to be able to login and logout from the application
Scenario: Access restricted to an anonymous user
Given Anonymous user
When I go to the home page
Then I should be on the login page
Scenario: Successfull login
Given User registered as cucumber
And I am on the login page
When I login with valid credentials
Then I should be on the dashboard
And I should see "Logout"
Scenario: Failed login
Given User registered as cucumber
And I am on the login page
When I login with invalid credentials
Then I should be on the path "/user_session"
And I should see "Login failed"
Scenario: Logout
Given Logged in user as cucumber
And I am on the dashboard
When I follow "Logout"
Then I should be anonymous user
And I should be on the login page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment