Permalink
Browse files

Add test case from ticket #4090

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4805 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 070f3fd commit caf546b675ce4771e5ad3349af41c74265b70feb @seckar seckar committed Aug 22, 2006
Showing with 12 additions and 0 deletions.
  1. +12 −0 actionpack/test/controller/routing_test.rb
View
12 actionpack/test/controller/routing_test.rb
@@ -1547,6 +1547,17 @@ def test_named_routes_are_never_relative_to_modules
url = set.generate({:use_route => :family_connection, :controller => "connection"}, {:controller => 'connection/manage'})
assert_equal "/connection", url
end
+
+ def test_action_left_off_when_id_is_recalled
+ set.draw do |map|
+ map.connect ':controller/:action/:id'
+ end
+ assert_equal '/post', set.generate(
+ {:controller => 'post', :action => 'index'},
+ {:controller => 'post', :action => 'show', :id => '10'}
+ )
+ end
+
end
class RoutingTest < Test::Unit::TestCase
@@ -1587,4 +1598,5 @@ def test_normalize_windows_paths
paths = ActionController::Routing.normalize_paths(load_paths)
assert_equal %w(vendor\\rails\\railties\\builtin\\rails_info vendor\\rails\\actionpack\\lib app\\controllers app\\helpers app\\models lib .), paths
end
+
end

0 comments on commit caf546b

Please sign in to comment.