aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Seckar <nseckar@gmail.com>2006-08-22 07:18:24 +0000
committerNicholas Seckar <nseckar@gmail.com>2006-08-22 07:18:24 +0000
commitcaf546b675ce4771e5ad3349af41c74265b70feb (patch)
treed403d21bbeda40088506eed088a2fd8ee267aa33
parent070f3fdc8ce317772358185016f60480105963d6 (diff)
downloadrails-caf546b675ce4771e5ad3349af41c74265b70feb.tar.gz
rails-caf546b675ce4771e5ad3349af41c74265b70feb.tar.bz2
rails-caf546b675ce4771e5ad3349af41c74265b70feb.zip
Add test case from ticket #4090
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4805 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--actionpack/test/controller/routing_test.rb12
1 files changed, 12 insertions, 0 deletions
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