File tree 3 files changed +16
-1
lines changed
3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ def password_update
22
22
flash [ :notice ] = "Password was successfully updated. Please login with it"
23
23
redirect_to new_user_session_path
24
24
else
25
- render action : "password"
25
+ render 'account'
26
26
end
27
27
end
28
28
Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ Feature: Profile
16
16
Then I change my password
17
17
And I should be redirected to sign in page
18
18
19
+ Scenario : I unsuccessfully change my password
20
+ Given I visit profile account page
21
+ When I unsuccessfully change my password
22
+ Then I should see a password error message
23
+
19
24
Scenario : I reset my token
20
25
Given I visit profile account page
21
26
Then I reset my token
Original file line number Diff line number Diff line change @@ -28,6 +28,16 @@ class Profile < Spinach::FeatureSteps
28
28
click_button "Save"
29
29
end
30
30
31
+ When 'I unsuccessfully change my password' do
32
+ fill_in "user_password" , with : "password"
33
+ fill_in "user_password_confirmation" , with : "confirmation"
34
+ click_button "Save"
35
+ end
36
+
37
+ Then "I should see a password error message" do
38
+ page . should have_content "Password doesn't match confirmation"
39
+ end
40
+
31
41
And 'I should be redirected to sign in page' do
32
42
current_path . should == new_user_session_path
33
43
end
You can’t perform that action at this time.
0 commit comments