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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
33a8dfd0
Commit
33a8dfd0
authored
Apr 07, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sessions controller specs more explicit
parent
00da609c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
spec/controllers/sessions_controller_spec.rb
spec/controllers/sessions_controller_spec.rb
+5
-4
No files found.
spec/controllers/sessions_controller_spec.rb
View file @
33a8dfd0
...
...
@@ -69,7 +69,7 @@ describe SessionsController do
end
end
context
'
when OTP is invalid'
do
context
'when OTP is invalid'
do
before
{
authenticate_2fa
(
otp_attempt:
'invalid'
)
}
it
'does not authenticate'
do
...
...
@@ -77,8 +77,8 @@ describe SessionsController do
end
it
'warns about invalid OTP code'
do
expect
(
response
).
to
set_flash
.
now
[
:alert
].
to
/Invalid two-factor code/
expect
(
response
).
to
set_flash
.
now
[
:alert
]
.
to
/Invalid two-factor code/
end
end
end
...
...
@@ -90,7 +90,8 @@ describe SessionsController do
authenticate_2fa
(
login:
another_user
.
username
,
otp_attempt:
'invalid'
)
expect
(
response
).
to_not
set_flash
.
now
[
:alert
].
to
/Invalid login or password/
expect
(
response
).
to
set_flash
.
now
[
:alert
]
.
to
/Invalid two-factor code/
end
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