aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-05-28 14:50:47 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-05-28 15:15:43 -0700
commite135bbacb9316ec6f1cad18548952816150ac927 (patch)
tree49982330534abfc8f72567a8c62695e8be367e10 /actionpack/test/dispatch/routing_test.rb
parent5bbab5110b141df0f856221a59a6f4ad1ea7c88c (diff)
downloadrails-e135bbacb9316ec6f1cad18548952816150ac927.tar.gz
rails-e135bbacb9316ec6f1cad18548952816150ac927.tar.bz2
rails-e135bbacb9316ec6f1cad18548952816150ac927.zip
add a test for existing mapper functionality
I'm not sure if this is actually used, but I'm adding a test to define the behavior
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index c9777ae71f..20e79523f9 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -3137,6 +3137,18 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
assert_equal '/foo', foo_root_path
end
+ def test_namespace_as_controller
+ 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
+
def test_trailing_slash
draw do
resources :streams