aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorBrian Cardarella <bcardarella@gmail.com>2012-03-03 22:17:34 -0500
committerBrian Cardarella <bcardarella@gmail.com>2012-03-03 22:25:05 -0500
commit2ee4dd856d47113625589bc5410b5a6669ea02d5 (patch)
treed573e5a7cd27390a6097b3eb0d8582878bdd8d59 /actionpack/test/controller
parentb4ac72c63890e139745f32a5c642ead548e038ba (diff)
downloadrails-2ee4dd856d47113625589bc5410b5a6669ea02d5.tar.gz
rails-2ee4dd856d47113625589bc5410b5a6669ea02d5.tar.bz2
rails-2ee4dd856d47113625589bc5410b5a6669ea02d5.zip
Route root helper shortcut
Allow the root route helper to accept just a string
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/routing_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index 2a7c1f86c6..272a7da8c5 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -437,6 +437,15 @@ class LegacyRouteSetTests < ActiveSupport::TestCase
assert_equal("/", routes.send(:root_path))
end
+ def test_named_route_root_without_hash
+ rs.draw do
+ root "hello#index"
+ end
+ routes = setup_for_named_route
+ assert_equal("http://test.host/", routes.send(:root_url))
+ assert_equal("/", routes.send(:root_path))
+ end
+
def test_named_route_with_regexps
rs.draw do
match 'page/:year/:month/:day/:title' => 'page#show', :as => 'article',