aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/routing_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/routing_test.rb')
-rw-r--r--actionpack/test/controller/routing_test.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index 4901c93a60..fee1ad3ccf 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -218,7 +218,16 @@ class LegacyRouteSetTests < Test::Unit::TestCase
map.normal ':controller/:action/:id'
end
end
-
+
+ def test_named_route_root
+ rs.draw do |map|
+ map.root :controller => "hello"
+ end
+ x = setup_for_named_route
+ assert_equal("http://named.route.test", x.send(:root_url))
+ assert_equal("/", x.send(:root_path))
+ end
+
def test_named_route_with_regexps
rs.draw do |map|
map.article 'page/:year/:month/:day/:title', :controller => 'page', :action => 'show',