From 2a0be666e3078e28a02de298b386ec4c09232978 Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Tue, 5 Jul 2016 16:34:34 -0500 Subject: Added a lot of stubbing to make sure OAUth requests are handled properly with 2FA --- spec/support/login_helpers.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'spec/support/login_helpers.rb') 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 -- cgit v1.2.3