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
40e16b22
Commit
40e16b22
authored
Jul 04, 2016
by
Patricio Cano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change order of stubbing to fix tests
parent
54672605
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
2 deletions
+1
-2
spec/features/login_spec.rb
spec/features/login_spec.rb
+1
-1
spec/support/login_helpers.rb
spec/support/login_helpers.rb
+0
-1
No files found.
spec/features/login_spec.rb
View file @
40e16b22
...
...
@@ -115,8 +115,8 @@ feature 'Login', feature: true do
end
it
'should show 2FA prompt after OAuth login'
do
user
=
create
(
:omniauth_user
,
:two_factor
,
extern_uid:
'my-uid'
,
provider:
'saml'
)
stub_omniauth_config
(
enabled:
true
,
auto_link_saml_user:
true
,
allow_single_sign_on:
[
'saml'
],
providers:
[
OpenStruct
.
new
(
name:
'saml'
,
label:
'saml'
,
args:
{})])
user
=
create
(
:omniauth_user
,
:two_factor
,
extern_uid:
'my-uid'
,
provider:
'saml'
)
login_via
(
'saml'
,
user
,
'my-uid'
)
expect
(
page
).
to
have_content
(
'Two-Factor Authentication'
)
...
...
spec/support/login_helpers.rb
View file @
40e16b22
...
...
@@ -40,7 +40,6 @@ module LoginHelpers
def
login_via
(
provider
,
user
,
uid
)
mock_auth_hash
(
provider
,
uid
,
user
.
email
)
visit
new_user_session_path
#page.find('.oauth-image-link').click
click_link
provider
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