From 707e2e88589f2db25b9c5716056b4bd309543baf Mon Sep 17 00:00:00 2001 From: Arthur Neves Date: Fri, 10 Oct 2014 19:04:18 -0400 Subject: [PATCH] Add regression test for router was overwriting PATH_INFO [related #17233] --- actionpack/test/controller/integration_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb index c6380c7ffd0..d91a1657b3e 100644 --- a/actionpack/test/controller/integration_test.rb +++ b/actionpack/test/controller/integration_test.rb @@ -615,6 +615,8 @@ class ApplicationIntegrationTest < ActionDispatch::IntegrationTest get 'bar', :to => 'application_integration_test/test#index', :as => :bar mount MountedApp => '/mounted', :as => "mounted" + get 'fooz' => proc { |env| [ 200, {'X-Cascade' => 'pass'}, [ "omg" ] ] }, :anchor => false + get 'fooz', :to => 'application_integration_test/test#index' end def app @@ -631,6 +633,12 @@ class ApplicationIntegrationTest < ActionDispatch::IntegrationTest assert_equal '/mounted/baz', mounted.baz_path end + test "path after cascade pass" do + get '/fooz' + assert_equal 'index', response.body + assert_equal '/fooz', path + end + test "route helpers after controller access" do get '/' assert_equal '/', empty_string_path