Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
4f04d7df
Commit
4f04d7df
authored
Nov 05, 2012
by
Valeriy Sizov
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1915 from tsigo/issue/1912
Fix rendered action for password change failure
parents
dd4d1248
89d9319a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
app/controllers/profile_controller.rb
app/controllers/profile_controller.rb
+1
-1
features/profile/profile.feature
features/profile/profile.feature
+5
-0
features/steps/profile/profile.rb
features/steps/profile/profile.rb
+10
-0
No files found.
app/controllers/profile_controller.rb
View file @
4f04d7df
...
@@ -22,7 +22,7 @@ class ProfileController < ApplicationController
...
@@ -22,7 +22,7 @@ class ProfileController < ApplicationController
flash
[
:notice
]
=
"Password was successfully updated. Please login with it"
flash
[
:notice
]
=
"Password was successfully updated. Please login with it"
redirect_to
new_user_session_path
redirect_to
new_user_session_path
else
else
render
action:
"password"
render
'account'
end
end
end
end
...
...
features/profile/profile.feature
View file @
4f04d7df
...
@@ -16,6 +16,11 @@ Feature: Profile
...
@@ -16,6 +16,11 @@ Feature: Profile
Then
I change my password
Then
I change my password
And
I should be redirected to sign in page
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
Scenario
:
I
reset my token
Given
I visit profile account page
Given
I visit profile account page
Then
I reset my token
Then
I reset my token
...
...
features/steps/profile/profile.rb
View file @
4f04d7df
...
@@ -28,6 +28,16 @@ class Profile < Spinach::FeatureSteps
...
@@ -28,6 +28,16 @@ class Profile < Spinach::FeatureSteps
click_button
"Save"
click_button
"Save"
end
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
And
'I should be redirected to sign in page'
do
current_path
.
should
==
new_user_session_path
current_path
.
should
==
new_user_session_path
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment