Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add regression test for router was overwriting PATH_INFO #17234

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions actionpack/test/controller/integration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,8 @@ def self.call(*)
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
Expand All @@ -631,6 +633,12 @@ def app
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
Expand Down