diff options
author | Richard Schneeman <richard.schneeman@gmail.com> | 2016-06-20 10:27:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-20 10:27:24 -0500 |
commit | ce459720ec5ef039d1f825c69bd3d929d5885996 (patch) | |
tree | 84978db672d9de8af0f398f71f84fbf35c0a6203 /railties/test | |
parent | 998d3044515f37c252cf5acfe923c4b69dcbd33c (diff) | |
parent | 9d513e0a19f2b9333cd752b2747db4f350fcddc4 (diff) | |
download | rails-ce459720ec5ef039d1f825c69bd3d929d5885996.tar.gz rails-ce459720ec5ef039d1f825c69bd3d929d5885996.tar.bz2 rails-ce459720ec5ef039d1f825c69bd3d929d5885996.zip |
Merge pull request #25430 from nfm/fix-rails-info-routes-for-apps-with-globbing-route
Fix rails/info routes for apps with globbing route
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/routing_test.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/railties/test/application/routing_test.rb b/railties/test/application/routing_test.rb index e51f32aaed..93847c7aa9 100644 --- a/railties/test/application/routing_test.rb +++ b/railties/test/application/routing_test.rb @@ -39,6 +39,25 @@ module ApplicationTests assert_equal 200, last_response.status end + test "/rails/info routes are accessible with globbing route present" do + app("development") + + app_file "config/routes.rb", <<-RUBY + Rails.application.routes.draw do + get '*foo', to: 'foo#index' + end + RUBY + + get "/rails/info" + assert_equal 302, last_response.status + + get "rails/info/routes" + assert_equal 200, last_response.status + + get "rails/info/properties" + assert_equal 200, last_response.status + end + test "root takes precedence over internal welcome controller" do app("development") |