diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2014-01-05 19:58:04 +0000 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2014-01-05 19:58:04 +0000 |
commit | 3a48b83e5eec62a5d2bfab1a118c24b45345388c (patch) | |
tree | 4d6ec108a94373c05026521940d67563f85b71a3 /actionpack/test/dispatch/routing_test.rb | |
parent | a1564d470d688eecd5fd01ee771521764cba4b7b (diff) | |
download | rails-3a48b83e5eec62a5d2bfab1a118c24b45345388c.tar.gz rails-3a48b83e5eec62a5d2bfab1a118c24b45345388c.tar.bz2 rails-3a48b83e5eec62a5d2bfab1a118c24b45345388c.zip |
Allow an absolute controller path inside a module scope
Fixes #12777
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 840c157642..5a532dc38f 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -2882,6 +2882,18 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest assert_equal '/downloads/1/1.tar', download_path('1', '1') end + def test_absolute_controller_namespace + draw do + namespace :foo do + get '/', to: '/bar#index', as: 'root' + end + end + + get '/foo' + assert_equal 'bar#index', @response.body + assert_equal '/foo', foo_root_path + end + private def draw(&block) |