From 757379128442d07ebebd7a3d22853d016cfb95b4 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Sat, 22 Sep 2007 19:20:06 +0000 Subject: Disable the routing optimisation code when dealing with foo_url helpers. Add test to actionmailer to expose the problem they introduced. References #9450 [Koz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7572 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/routing_test.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index c7b7f40e0d..bd66e11fd1 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -169,7 +169,7 @@ class LegacyRouteSetTests < Test::Unit::TestCase def test_basic_named_route rs.add_named_route :home, '', :controller => 'content', :action => 'list' x = setup_for_named_route - assert_equal("http://named.route.test", + assert_equal("http://named.route.test/", x.send(:home_url)) end @@ -189,7 +189,7 @@ class LegacyRouteSetTests < Test::Unit::TestCase end def test_named_route_with_nested_controller - rs.add_named_route :users, '/admin/user', :controller => '/admin/user', :action => 'index' + rs.add_named_route :users, 'admin/user', :controller => 'admin/user', :action => 'index' x = setup_for_named_route assert_equal("http://named.route.test/admin/user", x.send(:users_url)) @@ -201,9 +201,9 @@ class LegacyRouteSetTests < Test::Unit::TestCase rs.add_named_route :user, 'admin/user/:id', :controller=>'/admin/user', :action=>'show' x = setup_for_named_route x.expects(:url_for).never - x.send(:users_url) + # x.send(:users_url) x.send(:users_path) - x.send(:user_url, 2, :foo=>"bar") + # x.send(:user_url, 2, :foo=>"bar") x.send(:user_path, 3, :bar=>"foo") end end @@ -225,7 +225,7 @@ class LegacyRouteSetTests < Test::Unit::TestCase map.root :controller => "hello" end x = setup_for_named_route - assert_equal("http://named.route.test", x.send(:root_url)) + assert_equal("http://named.route.test/", x.send(:root_url)) assert_equal("/", x.send(:root_path)) end @@ -485,7 +485,7 @@ class LegacyRouteSetTests < Test::Unit::TestCase assert_equal '/', rs.generate(:controller => 'content') x = setup_for_named_route - assert_equal("http://named.route.test", + assert_equal("http://named.route.test/", x.send(:home_url)) end -- cgit v1.2.3