mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add test case from ticket #4090
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4805 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
070f3fdc8c
commit
caf546b675
1 changed files with 12 additions and 0 deletions
|
@ -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
|
Loading…
Reference in a new issue