diff --git a/features/change_password.feature b/features/change_password.feature index d0ee0fe24..f5f0f6f09 100644 --- a/features/change_password.feature +++ b/features/change_password.feature @@ -6,7 +6,8 @@ Feature: Change password And I click on my name in the header And I follow "account settings" Then I should be on my account settings page - When I fill in "user_password" with "newsecret" + When I put in my password in "user_current_password" + And I fill in "user_password" with "newsecret" And I fill in "user_password_confirmation" with "newsecret" And I press "Change Password" Then I should see "Password Changed" @@ -15,4 +16,4 @@ Feature: Change password Then I should be on the home page And I sign in with password "newsecret" Then I should be on the aspects page - \ No newline at end of file + diff --git a/features/step_definitions/session_steps.rb b/features/step_definitions/session_steps.rb index 4aa51129b..1b427c94b 100644 --- a/features/step_definitions/session_steps.rb +++ b/features/step_definitions/session_steps.rb @@ -30,3 +30,8 @@ When /^I sign in with password "([^"]*)"$/ do |password| Given 'I am signed in' end +When /^I put in my password in "([^"]*)"$/ do |field| + When %(I fill in "#{field}" with "#{@me.password}") +end + +