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:
authorRémy Coutable <remy@rymai.me>2019-04-23 21:30:29 +0300
committerRémy Coutable <remy@rymai.me>2019-04-23 22:11:08 +0300
commita16d7e414d04ccf3268be9cab2fdff15b2ecb45e (patch)
treeeeff8d77ae457e34acc435617dfb5c991ce6ae15 /spec/support/controllers
parentbe15592a1c1551bb6136081ea995dca49e238c8f (diff)
Revert Rails.application.env_config after using mock_auth_hash
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/support/controllers')
-rw-r--r--spec/support/controllers/ldap_omniauth_callbacks_controller_shared_context.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/support/controllers/ldap_omniauth_callbacks_controller_shared_context.rb b/spec/support/controllers/ldap_omniauth_callbacks_controller_shared_context.rb
index 72912ffb89d..a0c77eecb61 100644
--- a/spec/support/controllers/ldap_omniauth_callbacks_controller_shared_context.rb
+++ b/spec/support/controllers/ldap_omniauth_callbacks_controller_shared_context.rb
@@ -25,9 +25,13 @@ shared_context 'Ldap::OmniauthCallbacksController' do
described_class.define_providers!
Rails.application.reload_routes!
- mock_auth_hash(provider.to_s, uid, user.email)
+ @original_env_config_omniauth_auth = mock_auth_hash(provider.to_s, uid, user.email)
stub_omniauth_provider(provider, context: request)
allow(Gitlab::Auth::LDAP::Access).to receive(:allowed?).and_return(valid_login?)
end
+
+ after do
+ Rails.application.env_config['omniauth.auth'] = @original_env_config_omniauth_auth
+ end
end