logs_in_and_out.feature 735 Bytes
Newer Older
1 2 3 4 5 6 7 8
Feature: user authentication

  Scenario: user logs in
    Given a user with username "ohai" and password "secret"
    When I go to the new user session page
    And I fill in "Username" with "ohai"
    And I fill in "Password" with "secret"
    And I press "Sign in"
danielgrippi's avatar
danielgrippi committed
9
    Then I should be on the multi page
10 11 12 13 14

  @javascript
  Scenario: user logs out
    Given I am signed in
    And I click on my name in the header
15
    And I follow "Log out"
16 17
    Then I should be on the logged out page
    And I should see "Now go mobile."
18 19 20 21

  Scenario: user uses token auth
    Given a user with username "ohai" and password "secret"
    When I post a photo with a token
danielgrippi's avatar
danielgrippi committed
22
    And I go to the multi page
23
    Then I should be on the new user session page