aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/routing_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-09-15 20:38:39 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-09-15 20:38:39 +0000
commit494d2c631bbfacd6d67c5c502422c2502c2fcd3a (patch)
tree73c1cae29293cd7aad7f6834677806e19a9430ae /actionpack/test/controller/routing_test.rb
parent41ef9211a2f45eee0960f677f853de7ff1ad97c8 (diff)
downloadrails-494d2c631bbfacd6d67c5c502422c2502c2fcd3a.tar.gz
rails-494d2c631bbfacd6d67c5c502422c2502c2fcd3a.tar.bz2
rails-494d2c631bbfacd6d67c5c502422c2502c2fcd3a.zip
root_path returns '/' not ''. Closes #9563.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7482 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
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',