aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/routing_test.rb
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-10-22 23:48:52 +0000
committerRick Olson <technoweenie@gmail.com>2006-10-22 23:48:52 +0000
commitcfb7dea783e99c6bb10b35c34e6887d2ef159a43 (patch)
treef66805e45c2de9689ac5e8ce80b45c929399b7ab /actionpack/test/controller/routing_test.rb
parent1c71a5d25fff323eef25ca3f744151e59c1ee86b (diff)
downloadrails-cfb7dea783e99c6bb10b35c34e6887d2ef159a43.tar.gz
rails-cfb7dea783e99c6bb10b35c34e6887d2ef159a43.tar.bz2
rails-cfb7dea783e99c6bb10b35c34e6887d2ef159a43.zip
clean up failing routing tests from missing :only_path option [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5337 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/routing_test.rb')
-rw-r--r--actionpack/test/controller/routing_test.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index 343c9279ea..d39e4d98ab 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -137,23 +137,23 @@ class LegacyRouteSetTests < Test::Unit::TestCase
def test_basic_named_route
rs.add_named_route :home, '', :controller => 'content', :action => 'list'
x = setup_for_named_route.new
- assert_equal({:controller => 'content', :action => 'list', :use_route => :home},
+ assert_equal({:controller => 'content', :action => 'list', :use_route => :home, :only_path => false},
x.send(:home_url))
end
def test_named_route_with_option
rs.add_named_route :page, 'page/:title', :controller => 'content', :action => 'show_page'
x = setup_for_named_route.new
- assert_equal({:controller => 'content', :action => 'show_page', :title => 'new stuff', :use_route => :page},
+ assert_equal({:controller => 'content', :action => 'show_page', :title => 'new stuff', :use_route => :page, :only_path => false},
x.send(:page_url, :title => 'new stuff'))
end
def test_named_route_with_default
rs.add_named_route :page, 'page/:title', :controller => 'content', :action => 'show_page', :title => 'AboutPage'
x = setup_for_named_route.new
- assert_equal({:controller => 'content', :action => 'show_page', :title => 'AboutPage', :use_route => :page},
+ assert_equal({:controller => 'content', :action => 'show_page', :title => 'AboutPage', :use_route => :page, :only_path => false},
x.send(:page_url))
- assert_equal({:controller => 'content', :action => 'show_page', :title => 'AboutRails', :use_route => :page},
+ assert_equal({:controller => 'content', :action => 'show_page', :title => 'AboutRails', :use_route => :page, :only_path => false},
x.send(:page_url, :title => "AboutRails"))
end
@@ -161,7 +161,7 @@ class LegacyRouteSetTests < Test::Unit::TestCase
def test_named_route_with_nested_controller
rs.add_named_route :users, 'admin/user', :controller => '/admin/user', :action => 'index'
x = setup_for_named_route.new
- assert_equal({:controller => '/admin/user', :action => 'index', :use_route => :users},
+ assert_equal({:controller => '/admin/user', :action => 'index', :use_route => :users, :only_path => false},
x.send(:users_url))
end
@@ -186,11 +186,11 @@ class LegacyRouteSetTests < Test::Unit::TestCase
end
x = setup_for_named_route.new
assert_equal(
- {:controller => 'page', :action => 'show', :title => 'hi', :use_route => :article},
+ {:controller => 'page', :action => 'show', :title => 'hi', :use_route => :article, :only_path => false},
x.send(:article_url, :title => 'hi')
)
assert_equal(
- {:controller => 'page', :action => 'show', :title => 'hi', :day => 10, :year => 2005, :month => 6, :use_route => :article},
+ {:controller => 'page', :action => 'show', :title => 'hi', :day => 10, :year => 2005, :month => 6, :use_route => :article, :only_path => false},
x.send(:article_url, :title => 'hi', :day => 10, :year => 2005, :month => 6)
)
end
@@ -337,7 +337,7 @@ class LegacyRouteSetTests < Test::Unit::TestCase
assert_equal '/test', rs.generate(:controller => 'post', :action => 'show', :year => nil)
x = setup_for_named_route.new
- assert_equal({:controller => 'post', :action => 'show', :use_route => :blog},
+ assert_equal({:controller => 'post', :action => 'show', :use_route => :blog, :only_path => false},
x.send(:blog_url))
end
@@ -384,7 +384,7 @@ class LegacyRouteSetTests < Test::Unit::TestCase
assert_equal '/', rs.generate(:controller => 'content')
x = setup_for_named_route.new
- assert_equal({:controller => 'content', :action => 'index', :use_route => :root},
+ assert_equal({:controller => 'content', :action => 'index', :use_route => :root, :only_path => false},
x.send(:root_url))
end
@@ -1323,11 +1323,11 @@ class RouteSetTest < Test::Unit::TestCase
controller = setup_named_route_test
assert_equal(
- { :controller => 'people', :action => 'show', :id => 5, :use_route => :show },
+ { :controller => 'people', :action => 'show', :id => 5, :use_route => :show, :only_path => false },
controller.send(:hash_for_show_url, :id => 5))
assert_equal(
- { :controller => 'people', :action => 'index', :use_route => :index },
+ { :controller => 'people', :action => 'index', :use_route => :index, :only_path => false },
controller.send(:hash_for_index_url))
assert_equal(