tracks/features/logging_in.feature
Reinier Balt 2073f84cd8 update cucumber and refactor some of the stories
inspired by the railscasts about cucumber. Also fix a problem with ZenTest on case sensitive platforms
2009-05-22 23:14:40 +02:00

26 lines
No EOL
928 B
Gherkin

Feature: Existing user logging in
In order to keep my things private
As an existing user
I want to log in with my username and password
Background:
Given the following user records
| login | password | is_admin |
| testuser | secret | false |
| admin | secret | true |
Scenario Outline: Succesfull and unsuccesfull login
When I go to the login page
And I submit the login form as user "<user>" with password "<password>"
Then I should be <there>
And I should see "<message>"
Examples:
| user | password | there | message |
| admin | secret | redirected to the home page | Login successful |
| admin | wrong | on the login page | Login unsuccessful |
Scenario: Accessing a secured page when not logged in
When I go to the home page
Then I should be redirected to the login page