Navigation Menu

Skip to content

Commit

Permalink
Body params should be passad as raw post data.
Browse files Browse the repository at this point in the history
Renaming colliding method names.
  • Loading branch information
Hannes Tydén authored and mojodna committed Sep 9, 2009
1 parent d5f6b43 commit 5fa18d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_action_controller_request_proxy.rb
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/test_helper.rb'

require 'oauth/request_proxy/action_controller_request'
require 'action_controller'
require 'action_controller/test_process'

class ActionControllerRequestProxyTest < Test::Unit::TestCase
Expand All @@ -20,7 +20,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.proxy(request, :parameters => uri_params)
end

def test_that_proxy_simple_get_request_works_with_query_params
Expand All @@ -47,7 +47,7 @@ def test_that_proxy_simple_put_request_works_with_query_params
assert_equal 'PUT', request_proxy.method
end

def test_that_proxy_simple_put_request_works_with_post_params
def test_that_proxy_simple_get_request_works_with_post_params
request_proxy = request_proxy(:get, {}, {'key'=>'value'})

expected_parameters = []
Expand All @@ -71,7 +71,7 @@ def test_that_proxy_simple_put_request_works_with_post_params
assert_equal 'PUT', request_proxy.method
end

def test_that_proxy_simple_put_request_works_with_mixed_params
def test_that_proxy_simple_get_request_works_with_mixed_params
request_proxy = request_proxy(:get, {'key'=>'value'}, {'key2'=>'value2'})

expected_parameters = [["key", "value"]]
Expand Down

0 comments on commit 5fa18d1

Please sign in to comment.