From caf546b675ce4771e5ad3349af41c74265b70feb Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Tue, 22 Aug 2006 07:18:24 +0000 Subject: Add test case from ticket #4090 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4805 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/routing_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'actionpack/test/controller') diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index fc8bc82357..f44614beb7 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -1547,6 +1547,17 @@ class RouteSetTest < Test::Unit::TestCase 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 @@ class RoutingTest < Test::Unit::TestCase 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 \ No newline at end of file -- cgit v1.2.3