BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
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