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
e50c0d5c
Commit
e50c0d5c
authored
Oct 09, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spinach profile tests
parent
ffec158d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
9 deletions
+17
-9
app/controllers/profiles/passwords_controller.rb
app/controllers/profiles/passwords_controller.rb
+2
-2
features/profile/profile.feature
features/profile/profile.feature
+5
-5
features/steps/profile/profile.rb
features/steps/profile/profile.rb
+5
-1
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+5
-1
No files found.
app/controllers/profiles/passwords_controller.rb
View file @
e50c0d5c
class
Profiles::PasswordsController
<
ApplicationController
class
Profiles::PasswordsController
<
ApplicationController
layout
:determine_layout
layout
:determine_layout
skip_before_filter
:check_password_expiration
skip_before_filter
:check_password_expiration
,
only:
[
:new
,
:create
]
before_filter
:set_user
before_filter
:set_user
before_filter
:set_title
before_filter
:set_title
...
@@ -44,7 +44,7 @@ class Profiles::PasswordsController < ApplicationController
...
@@ -44,7 +44,7 @@ class Profiles::PasswordsController < 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
'
accoun
t'
render
'
edi
t'
end
end
end
end
...
...
features/profile/profile.feature
View file @
e50c0d5c
...
@@ -12,13 +12,13 @@ Feature: Profile
...
@@ -12,13 +12,13 @@ Feature: Profile
And
I should see new contact info
And
I should see new contact info
Scenario
:
I
change my password without old one
Scenario
:
I
change my password without old one
Given
I visit profile
account
page
Given
I visit profile
password
page
When
I try change my password w/o old one
When
I try change my password w/o old one
Then
I should see a missing password error message
Then
I should see a missing password error message
And
I should be redirected to
account
page
And
I should be redirected to
password
page
Scenario
:
I
change my password
Scenario
:
I
change my password
Given
I visit profile
account
page
Given
I visit profile
password
page
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
...
@@ -30,13 +30,13 @@ Feature: Profile
...
@@ -30,13 +30,13 @@ Feature: Profile
Scenario
:
My password is expired
Scenario
:
My password is expired
Given
my password is expired
Given
my password is expired
And
I am not an ldap user
And
I am not an ldap user
And
I visit profile account
page
Given
I visit profile password
page
Then
I redirected to expired password page
Then
I redirected to expired password page
And
I submit new password
And
I submit new password
And
I redirected to sign in page
And
I redirected to sign in page
Scenario
:
I
unsuccessfully change my password
Scenario
:
I
unsuccessfully change my password
Given
I visit profile
account
page
Given
I visit profile
password
page
When
I unsuccessfully change my password
When
I unsuccessfully change my password
Then
I should see a password error message
Then
I should see a password error message
...
...
features/steps/profile/profile.rb
View file @
e50c0d5c
...
@@ -133,8 +133,12 @@ class Profile < Spinach::FeatureSteps
...
@@ -133,8 +133,12 @@ class Profile < Spinach::FeatureSteps
current_path
.
should
==
new_user_session_path
current_path
.
should
==
new_user_session_path
end
end
step
'I should be redirected to password page'
do
current_path
.
should
==
edit_profile_password_path
end
step
'I should be redirected to account page'
do
step
'I should be redirected to account page'
do
current_path
.
should
==
account_profile
_path
current_path
.
should
==
profile_account
_path
end
end
step
'I click on my profile picture'
do
step
'I click on my profile picture'
do
...
...
features/steps/shared/paths.rb
View file @
e50c0d5c
...
@@ -65,8 +65,12 @@ module SharedPaths
...
@@ -65,8 +65,12 @@ module SharedPaths
visit
profile_path
visit
profile_path
end
end
step
'I visit profile password page'
do
visit
edit_profile_password_path
end
step
'I visit profile account page'
do
step
'I visit profile account page'
do
visit
account_profile
_path
visit
profile_account
_path
end
end
step
'I visit profile SSH keys page'
do
step
'I visit profile SSH keys page'
do
...
...
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