diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-22 21:10:56 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-22 21:10:56 +0000 |
commit | 79670fb9753693993f5c2f42e5b3d39e51ab4f43 (patch) | |
tree | 8e8fb91ed81115b5317da6f38b257c0760a60403 /actionpack/test | |
parent | f777ff72f931983946cbccbf2c64270922e93d84 (diff) | |
download | rails-79670fb9753693993f5c2f42e5b3d39e51ab4f43.tar.gz rails-79670fb9753693993f5c2f42e5b3d39e51ab4f43.tar.bz2 rails-79670fb9753693993f5c2f42e5b3d39e51ab4f43.zip |
request.parameters doesn't overwrite request.request_parameters. Closes #9949 [nullstyle]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7992 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/request_test.rb | 9 | ||||
-rw-r--r-- | actionpack/test/controller/test_test.rb | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/actionpack/test/controller/request_test.rb b/actionpack/test/controller/request_test.rb index 922699e331..1eb1990397 100644 --- a/actionpack/test/controller/request_test.rb +++ b/actionpack/test/controller/request_test.rb @@ -355,6 +355,15 @@ class RequestTest < Test::Unit::TestCase def test_user_agent assert_not_nil @request.user_agent end + + def test_parameters + @request.instance_eval { @request_parameters = { "foo" => 1 } } + @request.instance_eval { @query_parameters = { "bar" => 2 } } + + assert_equal({"foo" => 1, "bar" => 2}, @request.parameters) + assert_equal({"foo" => 1}, @request.request_parameters) + assert_equal({"bar" => 2}, @request.query_parameters) + end protected def set_request_method_to(method) diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb index 56c0a90831..305c5b6931 100644 --- a/actionpack/test/controller/test_test.rb +++ b/actionpack/test/controller/test_test.rb @@ -108,7 +108,7 @@ XML def test_raw_post_handling params = {:page => {:name => 'page name'}, 'some key' => 123} - get :render_raw_post, params.dup + post :render_raw_post, params.dup assert_equal params.to_query, @response.body end @@ -116,7 +116,7 @@ XML def test_body_stream params = { :page => { :name => 'page name' }, 'some key' => 123 } - get :render_body, params.dup + post :render_body, params.dup assert_equal params.to_query, @response.body end |