Permalink
Browse files

after assign_parameters correctly stringifies fixnum params passed in…

… controller test calls, don't overwrite them with the un-strified values. existing tests did attempt to cover this, but bypassed the params hash which is affected.
  • Loading branch information...
willbryant committed Oct 15, 2011
1 parent 960882f commit 227392113cc927c152741b21e00af72e62c48f05
Showing with 3 additions and 2 deletions.
  1. +0 −1 actionpack/lib/action_controller/test_case.rb
  2. +3 −1 actionpack/test/controller/test_test.rb
@@ -442,7 +442,6 @@ def process(action, parameters = nil, session = nil, flash = nil, http_method =
@request.session["flash"].sweep
@controller.request = @request
- @controller.params.merge!(parameters)
build_request_uri(action, parameters)
@controller.class.class_eval { include Testing }
@controller.recycle!
@@ -546,8 +546,10 @@ def test_params_passing_doesnt_modify_in_place
end
def test_id_converted_to_string
- get :test_params, :id => 20, :foo => Object.new
+ get :test_params, :id => 20, :foo => 'bar'
assert_kind_of String, @request.path_parameters['id']
+ parsed_params = eval(@response.body)
+ assert_equal '20', parsed_params['id']
end
def test_array_path_parameter_handled_properly

0 comments on commit 2273921

Please sign in to comment.