Sha256: 3274a24cd3677c05d206b45d49721b992298f2e0853b4eba547286813f482dfc

Contents?: true

Size: 831 Bytes

Versions: 11

Compression:

Stored size: 831 Bytes

Contents

require 'action_controller'
require 'action_controller/test_process'
module OAuth
  module OAuthTestHelper
    
    def mock_incoming_request_with_query(request)
      incoming=ActionController::TestRequest.new(request.to_hash)
      incoming.request_uri=request.path
      incoming.env["SERVER_PORT"]=request.uri.port
      incoming.host=request.uri.host
      incoming.env['REQUEST_METHOD']=request.http_method
      incoming
    end

    def mock_incoming_request_with_authorize_header(request)
      incoming=ActionController::TestRequest.new
      incoming.env["HTTP_AUTHORIZATION"]=request.to_auth_string
      incoming.request_uri=request.path
      incoming.env["SERVER_PORT"]=request.uri.port
      incoming.host=request.uri.host
      incoming.env['REQUEST_METHOD']=request.http_method
      incoming
    end
  
  end
end

Version data entries

11 entries across 11 versions & 4 rubygems

Version Path
monkeyhelper-oauth-0.3.1 lib/oauth/oauth_test_helper.rb
pelle-oauth-0.3.0 lib/oauth/oauth_test_helper.rb
pelle-oauth-0.3.1 lib/oauth/oauth_test_helper.rb
proletarian-oauth-0.3.2 lib/oauth/oauth_test_helper.rb
proletarian-oauth-0.3.3 lib/oauth/oauth_test_helper.rb
proletarian-oauth-0.3.4 lib/oauth/oauth_test_helper.rb
proletarian-oauth-0.3.5 lib/oauth/oauth_test_helper.rb
proletarian-oauth-0.3.6 lib/oauth/oauth_test_helper.rb
proletarian-oauth-0.3.7 lib/oauth/oauth_test_helper.rb
oauth-0.3.0 lib/oauth/oauth_test_helper.rb
oauth-0.3.1 lib/oauth/oauth_test_helper.rb