From 0adb8f8fa6b99784079750e413659e6b93dbbe51 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 9 Jul 2015 19:27:03 -0700 Subject: Parameters are converted to a query string Since parameters are converted to a query string, they will automatically be turned in to strings by the query parser --- actionpack/lib/action_controller/test_case.rb | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 6d362a9fd8..389c470456 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -414,19 +414,6 @@ module ActionController end alias xhr :xml_http_request - def paramify_values(hash_or_array_or_value) - case hash_or_array_or_value - when Hash - Hash[hash_or_array_or_value.map{|key, value| [key, paramify_values(value)] }] - when Array - hash_or_array_or_value.map {|i| paramify_values(i)} - when Rack::Test::UploadedFile, ActionDispatch::Http::UploadedFile - hash_or_array_or_value - else - hash_or_array_or_value.to_param - end - end - # Simulate a HTTP request to +action+ by specifying request method, # parameters and set/volley the response. # @@ -486,10 +473,6 @@ module ActionController parameters ||= {} - # Ensure that numbers and symbols passed as params are converted to - # proper params, as is the case when engaging rack. - parameters = paramify_values(parameters) if html_format?(parameters) - if format.present? parameters[:format] = format end -- cgit v1.2.3