mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +01:00
inspired by the railscasts about cucumber. Also fix a problem with ZenTest on case sensitive platforms
26 lines
No EOL
928 B
Gherkin
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 |