diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-07-06 00:34:34 +0300 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-07-08 00:54:03 +0300 |
commit | 2a0be666e3078e28a02de298b386ec4c09232978 (patch) | |
tree | fdb020ec2b4547a46e935160f2f62a404134d6b5 /spec/support | |
parent | eda205342140e1bc71b5f0b6935b5ffc502a85cd (diff) |
Added a lot of stubbing to make sure OAUth requests are handled properly with 2FA
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/login_helpers.rb | 10 | ||||
-rw-r--r-- | spec/support/omni_auth.rb | 2 |
2 files changed, 11 insertions, 1 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 diff --git a/spec/support/omni_auth.rb b/spec/support/omni_auth.rb index 3d262ff9ca0..0b1af4052ff 100644 --- a/spec/support/omni_auth.rb +++ b/spec/support/omni_auth.rb @@ -1 +1 @@ -OmniAuth.config.test_mode = true
\ No newline at end of file +OmniAuth.config.test_mode = true |