From e135bbacb9316ec6f1cad18548952816150ac927 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 28 May 2014 14:50:47 -0700 Subject: 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 --- actionpack/test/dispatch/routing_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'actionpack/test/dispatch') 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 -- cgit v1.2.3