diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-11-26 22:41:28 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-11-26 22:41:28 +0000 |
commit | 5e94f053cb52bac19bb0d5bb41bc52113c5a2078 (patch) | |
tree | f181b7d411df465f03af0ade7b6620f4874aae70 /actionpack/test/controller | |
parent | a0c925c0a37c2ef4d8774dcce93c3da187e2d76d (diff) | |
download | rails-5e94f053cb52bac19bb0d5bb41bc52113c5a2078.tar.gz rails-5e94f053cb52bac19bb0d5bb41bc52113c5a2078.tar.bz2 rails-5e94f053cb52bac19bb0d5bb41bc52113c5a2078.zip |
Fixed to_s bug with namespace routes (closes #10283) [johnb]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8216 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index 1036d7f3bf..8be709a7f4 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -1994,6 +1994,26 @@ class RouteSetTest < Test::Unit::TestCase assert_equal("index", request.path_parameters[:action]) end + def test_setting_root_in_namespace_using_symbol + assert_nothing_raised do + set.draw do |map| + map.namespace :admin do |admin| + admin.root :controller => 'home' + end + end + end + end + + def test_setting_root_in_namespace_using_string + assert_nothing_raised do + set.draw do |map| + map.namespace 'admin' do |admin| + admin.root :controller => 'home' + end + end + end + end + end class RoutingTest < Test::Unit::TestCase |