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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-29 21:07:04 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-29 21:07:04 +0300
commitbc0c5df2f15523e8c4a57682b149526f0cf55b9c (patch)
tree5264741513c3d10e1589e9566243ea6202b69e63 /spec/support/omniauth_strategy.rb
parentcbafce7e89a8761c0c8062392803346f42f489fc (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/omniauth_strategy.rb')
-rw-r--r--spec/support/omniauth_strategy.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/spec/support/omniauth_strategy.rb b/spec/support/omniauth_strategy.rb
index 23907b8e450..116db82febd 100644
--- a/spec/support/omniauth_strategy.rb
+++ b/spec/support/omniauth_strategy.rb
@@ -6,12 +6,6 @@ module StrategyHelpers
include Shoulda::Matchers::ActionController
include OmniAuth::Test::StrategyTestCase
- def post(*args)
- super.tap do
- @response = ActionDispatch::TestResponse.from_response(last_response)
- end
- end
-
def auth_hash
last_request.env['omniauth.auth']
end
@@ -21,7 +15,9 @@ module StrategyHelpers
original_on_failure = OmniAuth.config.on_failure
OmniAuth.config.test_mode = false
- OmniAuth.config.on_failure = OmniAuth::FailureEndpoint
+ OmniAuth.config.on_failure = proc do |env|
+ OmniAuth::FailureEndpoint.new(env).redirect_to_failure
+ end
yield
ensure