aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2018-09-27 16:57:35 -0400
committerGitHub <noreply@github.com>2018-09-27 16:57:35 -0400
commit16e6d42b225bc4dbdb6d96338df5a60ca4ce3f4e (patch)
tree73e339c6e71c3e6399432179da25f490b882cbf3 /actionpack/test/dispatch
parent8ad897fdedff6eb09daeb856786f3cc555b5c4e5 (diff)
parent7670d60977a7de3d11a8a9004b8a7a1c60383ee7 (diff)
downloadrails-16e6d42b225bc4dbdb6d96338df5a60ca4ce3f4e.tar.gz
rails-16e6d42b225bc4dbdb6d96338df5a60ca4ce3f4e.tar.bz2
rails-16e6d42b225bc4dbdb6d96338df5a60ca4ce3f4e.zip
Merge pull request #34002 from gmcgibbon/fix_deeply_nested_scoped_root
Fix optionally scoped root route unscoped access
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r--actionpack/test/dispatch/routing_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index ee87791538..affc2d8497 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -1382,6 +1382,22 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
assert_equal "projects#index", @response.body
end
+ def test_optionally_scoped_root_unscoped_access
+ draw do
+ scope "(:locale)" do
+ scope "(:platform)" do
+ scope "(:browser)" do
+ root to: "projects#index"
+ end
+ end
+ end
+ end
+
+ assert_equal "/", root_path
+ get "/"
+ assert_equal "projects#index", @response.body
+ end
+
def test_scope_with_format_option
draw do
get "direct/index", as: :no_format_direct, format: false