aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorGannon McGibbon <gannon.mcgibbon@gmail.com>2018-09-27 11:00:44 -0400
committerGannon McGibbon <gannon.mcgibbon@gmail.com>2018-09-27 13:12:22 -0400
commit7670d60977a7de3d11a8a9004b8a7a1c60383ee7 (patch)
treeba036e61a8f16838fef075cc2e46dbe5e16cadd2 /actionpack/test
parent8e123847e8ba0a59aafa708950a4887a669311b4 (diff)
downloadrails-7670d60977a7de3d11a8a9004b8a7a1c60383ee7.tar.gz
rails-7670d60977a7de3d11a8a9004b8a7a1c60383ee7.tar.bz2
rails-7670d60977a7de3d11a8a9004b8a7a1c60383ee7.zip
Fix optionally scoped root route unscoped access
Diffstat (limited to 'actionpack/test')
-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 5efbe5b553..fdfa21fccc 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -1367,6 +1367,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