Skip to content

Commit

Permalink
Instead of guessing the proxy type, switched the test to explicitly i…
Browse files Browse the repository at this point in the history
…nstantiate the class that needs to be tested
  • Loading branch information
ecavazos committed Aug 13, 2010
1 parent ab35458 commit 366e1e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test_action_controller_request_proxy.rb
Expand Up @@ -5,6 +5,7 @@
require 'action_controller/test_process'

class ActionControllerRequestProxyTest < Test::Unit::TestCase

def request_proxy(request_method = :get, uri_params = {}, body_params = {})
request = ActionController::TestRequest.new
request.set_REQUEST_URI('/')
Expand All @@ -22,7 +23,7 @@ def request_proxy(request_method = :get, uri_params = {}, body_params = {})
request.env['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'

yield request if block_given?
OAuth::RequestProxy.proxy(request, :parameters => uri_params)
OAuth::RequestProxy::ActionControllerRequest.new(request, :parameters => uri_params)
end

def test_that_proxy_simple_get_request_works_with_query_params
Expand Down

0 comments on commit 366e1e0

Please sign in to comment.