aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/test_test.rb
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2011-08-23 11:07:37 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2011-08-23 11:07:37 +0100
commit14cf4b2e353f923155aab1ae0eaafed3c2924b12 (patch)
treee7e89dcf22b2dd76a31beb0205fcbec0ace57295 /actionpack/test/controller/test_test.rb
parent7079701e5bfe3b8d6e8339f2cc4964e3608f1ffe (diff)
downloadrails-14cf4b2e353f923155aab1ae0eaafed3c2924b12.tar.gz
rails-14cf4b2e353f923155aab1ae0eaafed3c2924b12.tar.bz2
rails-14cf4b2e353f923155aab1ae0eaafed3c2924b12.zip
Don't modify params in place - fixes #2624
Diffstat (limited to 'actionpack/test/controller/test_test.rb')
-rw-r--r--actionpack/test/controller/test_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb
index 043d44500a..eae5a3d472 100644
--- a/actionpack/test/controller/test_test.rb
+++ b/actionpack/test/controller/test_test.rb
@@ -515,6 +515,12 @@ XML
)
end
+ def test_params_passing_doesnt_modify_in_place
+ page = {:name => "Page name", :month => 4, :year => 2004, :day => 6}
+ get :test_params, :page => page
+ assert_equal 2004, page[:year]
+ end
+
def test_id_converted_to_string
get :test_params, :id => 20, :foo => Object.new
assert_kind_of String, @request.path_parameters['id']