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
Kazuhiko Shiozaki
gitlab-ce
Commits
9052f13b
Commit
9052f13b
authored
Sep 30, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove specs for "login after reset"
We're now using default Devise behavior, so these tests were redundant.
parent
ceb21cc4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
40 deletions
+0
-40
spec/features/password_reset_spec.rb
spec/features/password_reset_spec.rb
+0
-40
No files found.
spec/features/password_reset_spec.rb
View file @
9052f13b
...
...
@@ -34,50 +34,10 @@ feature 'Password reset', feature: true do
end
end
describe
'with two-factor authentication'
do
it
'requires login after password reset'
do
visit
root_path
forgot_password
(
create
(
:user
,
:two_factor
))
reset_password
expect
(
page
).
to
have_content
(
"Your password was changed successfully."
)
expect
(
page
).
not_to
have_content
(
"You are now signed in."
)
expect
(
current_path
).
to
eq
new_user_session_path
end
end
describe
'without two-factor authentication'
do
it
'requires login after password reset'
do
visit
root_path
forgot_password
(
create
(
:user
))
reset_password
expect
(
page
).
to
have_content
(
"Your password was changed successfully."
)
expect
(
page
).
not_to
have_content
(
"You are now signed in."
)
expect
(
current_path
).
to
eq
new_user_session_path
end
end
def
forgot_password
(
user
)
click_on
'Forgot your password?'
fill_in
'Email'
,
with:
user
.
email
click_button
'Reset password'
user
.
reload
end
def
get_reset_token
mail
=
ActionMailer
::
Base
.
deliveries
.
last
body
=
mail
.
body
.
encoded
body
.
scan
(
/reset_password_token=(.+)\"/
).
flatten
.
first
end
def
reset_password
(
password
=
'password'
)
visit
edit_user_password_path
(
reset_password_token:
get_reset_token
)
fill_in
'New password'
,
with:
password
fill_in
'Confirm new password'
,
with:
password
click_button
'Change your password'
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