Skip to content

Commit

Permalink
Call thru to app in mock request_phase. Closes #152
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Bleigh committed Feb 4, 2011
1 parent 1343dd7 commit 61e64c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions oa-core/lib/omniauth/strategy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def call!(env)

def mock_call!(env)
if current_path == request_path
status, headers, body = *call_app!
@response = Rack::Response.new(body, status, headers)
redirect callback_path
elsif current_path == callback_path
@env['omniauth.auth'] = OmniAuth.mock_auth_for(name.to_sym)
Expand Down

0 comments on commit 61e64c3

Please sign in to comment.