diff --git a/features/step_definitions/clearance_steps.rb b/features/step_definitions/clearance_steps.rb index a563b91..8da321a 100644 --- a/features/step_definitions/clearance_steps.rb +++ b/features/step_definitions/clearance_steps.rb @@ -51,13 +51,14 @@ Then /^a confirmation message should be sent to "(.*)"$/ do |email| sent = ActionMailer::Base.deliveries.first assert_equal [user.email], sent.to assert_match /confirm/i, sent.subject - assert !user.token.blank? - assert_match /#{user.token}/, sent.body + assert !user.confirmation_token.blank? + assert_match /#{user.confirmation_token}/, sent.body end When /^I follow the confirmation link sent to "(.*)"$/ do |email| user = User.find_by_email(email) - visit new_user_confirmation_path(:user_id => user, :token => user.token) + visit new_user_confirmation_path(:user_id => user, + :token => user.confirmation_token) end Then /^a password reset message should be sent to "(.*)"$/ do |email| @@ -65,13 +66,14 @@ Then /^a password reset message should be sent to "(.*)"$/ do |email| sent = ActionMailer::Base.deliveries.first assert_equal [user.email], sent.to assert_match /password/i, sent.subject - assert !user.token.blank? - assert_match /#{user.token}/, sent.body + assert !user.confirmation_token.blank? + assert_match /#{user.confirmation_token}/, sent.body end When /^I follow the password reset link sent to "(.*)"$/ do |email| user = User.find_by_email(email) - visit edit_user_password_path(:user_id => user, :token => user.token) + visit edit_user_password_path(:user_id => user, + :token => user.confirmation_token) end When /^I try to change the password of "(.*)" without token$/ do |email| @@ -85,11 +87,10 @@ end # Actions -When /^I sign in( with "remember me")? as "(.*)\/(.*)"$/ do |remember, email, password| +When /^I sign in as "(.*)\/(.*)"$/ do |email, password| When %{I go to the sign in page} And %{I fill in "Email" with "#{email}"} And %{I fill in "Password" with "#{password}"} - And %{I check "Remember me"} if remember And %{I press "Sign In"} end @@ -99,13 +100,13 @@ end When /^I request password reset link to be sent to "(.*)"$/ do |email| When %{I go to the password reset request page} - And %{I fill in "Email" with "#{email}"} + And %{I fill in "Email address" with "#{email}"} And %{I press "Reset password"} end When /^I update my password with "(.*)\/(.*)"$/ do |password, confirmation| - And %{I fill in "Password" with "#{password}"} - And %{I fill in "Password confirmation" with "#{confirmation}"} + And %{I fill in "Choose password" with "#{password}"} + And %{I fill in "Confirm password" with "#{confirmation}"} And %{I press "Save this password"} end diff --git a/features/users/sign_in.feature b/features/users/sign_in.feature index 4b44c39..ab8dbf6 100644 --- a/features/users/sign_in.feature +++ b/features/users/sign_in.feature @@ -30,13 +30,6 @@ Feature: Sign in And I sign in as "email@person.com/password" Then I should see "Signed in" And I should be signed in - - Scenario: User signs in and checks "remember me" - Given I am signed up and confirmed as "email@person.com/password" - When I go to the sign in page - And I sign in with "remember me" as "email@person.com/password" - Then I should see "Signed in" - And I should be signed in When I return next time Then I should be signed in diff --git a/features/users/sign_out.feature b/features/users/sign_out.feature index 2107226..8789d97 100644 --- a/features/users/sign_out.feature +++ b/features/users/sign_out.feature @@ -10,14 +10,6 @@ Feature: Sign out And I sign out Then I should see "Signed out" And I should be signed out - - Scenario: User who was remembered signs out - Given I am signed up and confirmed as "email@person.com/password" - When I sign in with "remember me" as "email@person.com/password" - Then I should be signed in - And I sign out - Then I should see "Signed out" - And I should be signed out When I return next time Then I should be signed out -- libgit2 0.21.2