Skip to content

Commit

Permalink
after assign_parameters correctly stringifies fixnum params passed in…
Browse files Browse the repository at this point in the history
… 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 20, 2011
1 parent 960882f commit 2273921
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion actionpack/lib/action_controller/test_case.rb
Expand Up @@ -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!
Expand Down
4 changes: 3 additions & 1 deletion actionpack/test/controller/test_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit 2273921

Please sign in to comment.