diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-07-05 16:34:34 -0500 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-07-07 16:54:03 -0500 |
commit | 2a0be666e3078e28a02de298b386ec4c09232978 (patch) | |
tree | fdb020ec2b4547a46e935160f2f62a404134d6b5 /spec/support/login_helpers.rb | |
parent | eda205342140e1bc71b5f0b6935b5ffc502a85cd (diff) | |
download | gitlab-ce-2a0be666e3078e28a02de298b386ec4c09232978.tar.gz |
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.rb | 10 |
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 |