diff options
author | Valeriy Sizov <vsv2711@gmail.com> | 2012-11-05 01:29:03 -0800 |
---|---|---|
committer | Valeriy Sizov <vsv2711@gmail.com> | 2012-11-05 01:29:03 -0800 |
commit | 4f04d7df66cef913ef06cef259b8a01793841434 (patch) | |
tree | 2b4737a073b2219b72b8205ceab51a51980e0dd1 /features | |
parent | dd4d124832c387ddfc694fdcdae694dc5289cb6c (diff) | |
parent | 89d9319a791fd49dea734414bdbfe840816fb14c (diff) | |
download | gitlab-ce-4f04d7df66cef913ef06cef259b8a01793841434.tar.gz |
Merge pull request #1915 from tsigo/issue/1912
Fix rendered action for password change failure
Diffstat (limited to 'features')
-rw-r--r-- | features/profile/profile.feature | 5 | ||||
-rw-r--r-- | features/steps/profile/profile.rb | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/features/profile/profile.feature b/features/profile/profile.feature index d07a6db1a79..a98988b8ded 100644 --- a/features/profile/profile.feature +++ b/features/profile/profile.feature @@ -16,6 +16,11 @@ Feature: Profile Then I change my password And I should be redirected to sign in page + Scenario: I unsuccessfully change my password + Given I visit profile account page + When I unsuccessfully change my password + Then I should see a password error message + Scenario: I reset my token Given I visit profile account page Then I reset my token diff --git a/features/steps/profile/profile.rb b/features/steps/profile/profile.rb index 605936ba55e..efab1010481 100644 --- a/features/steps/profile/profile.rb +++ b/features/steps/profile/profile.rb @@ -28,6 +28,16 @@ class Profile < Spinach::FeatureSteps click_button "Save" end + When 'I unsuccessfully change my password' do + fill_in "user_password", with: "password" + fill_in "user_password_confirmation", with: "confirmation" + click_button "Save" + end + + Then "I should see a password error message" do + page.should have_content "Password doesn't match confirmation" + end + And 'I should be redirected to sign in page' do current_path.should == new_user_session_path end |