From e459b29fb4117dac66be241e1ddb9fa9ce67594c Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 10 Jul 2015 11:51:14 -0700 Subject: default `PATH_INFO` to the generated path we were already generating a path in the previous code (it was just not returned), so lets just use the already computed path to popluate the PATH_INFO header --- actionpack/lib/action_controller/test_case.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller') diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 6495e549e0..26ddd895b7 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -44,7 +44,7 @@ module ActionController def assign_parameters(routes, controller_path, action, parameters = {}) parameters = parameters.symbolize_keys - extra_keys = routes.extra_keys(parameters.merge(:controller => controller_path, :action => action)) + generated_path, extra_keys = routes.generate_extras(parameters.merge(:controller => controller_path, :action => action)) non_path_parameters = {} path_parameters = {} @@ -97,6 +97,7 @@ module ActionController @env['rack.input'] = StringIO.new(data) end + @env["PATH_INFO"] ||= generated_path path_parameters[:controller] = controller_path path_parameters[:action] = action -- cgit v1.2.3