Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #795 from tomhughes/fail-origin

Set origin when mocking a failure
  • Loading branch information...
commit fc304abe2b56cb6efeff87efdc50d120f4d8e1c0 2 parents e1408f5 + 32eed3b
Michael Bleigh mbleigh authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/omniauth/strategy.rb
4 lib/omniauth/strategy.rb
View
@@ -278,14 +278,14 @@ def mock_request_call
def mock_callback_call
setup_phase
+ @env['omniauth.origin'] = session.delete('omniauth.origin')
+ @env['omniauth.origin'] = nil if env['omniauth.origin'] == ''
mocked_auth = OmniAuth.mock_auth_for(name.to_s)
if mocked_auth.is_a?(Symbol)
fail!(mocked_auth)
else
@env['omniauth.auth'] = mocked_auth
@env['omniauth.params'] = session.delete('omniauth.params') || {}
- @env['omniauth.origin'] = session.delete('omniauth.origin')
- @env['omniauth.origin'] = nil if env['omniauth.origin'] == ''
OmniAuth.config.before_callback_phase.call(@env) if OmniAuth.config.before_callback_phase
call_app!
end
Please sign in to comment.
Something went wrong with that request. Please try again.