diff options
author | Rémy Coutable <remy@rymai.me> | 2019-04-23 21:30:29 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-04-23 22:11:08 +0300 |
commit | a16d7e414d04ccf3268be9cab2fdff15b2ecb45e (patch) | |
tree | eeff8d77ae457e34acc435617dfb5c991ce6ae15 /spec/controllers/omniauth_callbacks_controller_spec.rb | |
parent | be15592a1c1551bb6136081ea995dca49e238c8f (diff) |
Revert Rails.application.env_config after using mock_auth_hash
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/controllers/omniauth_callbacks_controller_spec.rb')
-rw-r--r-- | spec/controllers/omniauth_callbacks_controller_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/controllers/omniauth_callbacks_controller_spec.rb b/spec/controllers/omniauth_callbacks_controller_spec.rb index 0af0eb4f942..6e374a8daa7 100644 --- a/spec/controllers/omniauth_callbacks_controller_spec.rb +++ b/spec/controllers/omniauth_callbacks_controller_spec.rb @@ -9,10 +9,14 @@ describe OmniauthCallbacksController, type: :controller do let(:user) { create(:omniauth_user, extern_uid: extern_uid, provider: provider) } before do - mock_auth_hash(provider.to_s, +extern_uid, user.email) + @original_env_config_omniauth_auth = mock_auth_hash(provider.to_s, +extern_uid, user.email) stub_omniauth_provider(provider, context: request) end + after do + Rails.application.env_config['omniauth.auth'] = @original_env_config_omniauth_auth + end + context 'when the user is on the last sign in attempt' do let(:extern_uid) { 'my-uid' } |