mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #17234 from arthurnn/add_regression_for_path_and_cascade
Add regression test for router was overwriting PATH_INFO
This commit is contained in:
commit
c0c5f30d41
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue