Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatricio Cano <suprnova32@gmail.com>2016-07-06 00:34:34 +0300
committerPatricio Cano <suprnova32@gmail.com>2016-07-08 00:54:03 +0300
commit2a0be666e3078e28a02de298b386ec4c09232978 (patch)
treefdb020ec2b4547a46e935160f2f62a404134d6b5 /spec/support/login_helpers.rb
parenteda205342140e1bc71b5f0b6935b5ffc502a85cd (diff)
Added a lot of stubbing to make sure OAUth requests are handled properly with 2FA
Diffstat (limited to 'spec/support/login_helpers.rb')
-rw-r--r--spec/support/login_helpers.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/support/login_helpers.rb b/spec/support/login_helpers.rb
index f9ce929000c..2e400dd825a 100644
--- a/spec/support/login_helpers.rb
+++ b/spec/support/login_helpers.rb
@@ -39,6 +39,7 @@ module LoginHelpers
def login_via(provider, user, uid)
mock_auth_hash(provider, uid, user.email)
+ Rails.application.env_config['omniauth.auth'] = OmniAuth.config.mock_auth[:saml]
visit new_user_session_path
click_link provider
end
@@ -57,6 +58,15 @@ module LoginHelpers
credentials: {
token: 'mock_token',
secret: 'mock_secret'
+ },
+ extra: {
+ raw_info: {
+ info: {
+ name: 'mockuser',
+ email: email,
+ image: 'mock_user_thumbnail_url'
+ }
+ }
}
})
end