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...
1 parent 98af117 commit 3608f60a6224525a9d9fd34dee2a2856859c6204 @willbryant committed Oct 15, 2011
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
@@ -408,7 +408,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)
Base.class_eval { include Testing }
@controller.process_with_new_base_test(@request, @response)
@@ -498,8 +498,10 @@ def test_params_passing_with_frozen_values
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 3608f60

Please sign in to comment.