Added a failing cucumber scenario for logging in without a membership to the site.

This commit is contained in:
Mario Visic 2011-08-27 13:28:51 +08:00
parent 265525c1a7
commit 63c30bc135

View File

@ -6,16 +6,28 @@ Feature: Login
Background:
Given I have the site: "test site" set up
Scenario: Successful authentication
Scenario: Successfully logging in
When I go to login
And I fill in "Email" with "admin@locomotiveapp.org"
And I fill in "Password" with "easyone"
And I press "Log in"
Then I should see "Listing pages"
Scenario: Failed authentication
Scenario: Attempting to login with an invalid emai or password
When I go to login
And I fill in "Email" with "admin@locomotiveapp.org"
And I fill in "Password" with ""
And I press "Log in"
Then I should not see "Listing pages"
Then I should not see "Listing pages"
And I should see "Invalid email or password"
Scenario: Attempting to login with an account without a membership
Given the following accounts exist:
| email | password | password_confirmation |
| john@locomotiveapp.org | bluecheese | bluecheese |
When I go to login
And I fill in "Email" with "john@locomotiveapp.org"
And I fill in "Password" with "bluecheese"
And I press "Log in"
Then I should not see "Listing pages"
And I should see "not a member of this site"