aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorRizwan Reza <rizwanreza@gmail.com>2010-03-29 05:45:32 +0430
committerwycats <wycats@gmail.com>2010-03-28 18:34:48 -0700
commitcf6734fdf9d72bfc7fe92e36bf603d67ad815e6b (patch)
tree02ec1546007f4eec3f3ff96cf763aff3583626c3 /actionpack/test/dispatch/routing_test.rb
parent72074aac334a846fbb53e7cb12c0254c15004c26 (diff)
downloadrails-cf6734fdf9d72bfc7fe92e36bf603d67ad815e6b.tar.gz
rails-cf6734fdf9d72bfc7fe92e36bf603d67ad815e6b.tar.bz2
rails-cf6734fdf9d72bfc7fe92e36bf603d67ad815e6b.zip
Add more tests and docs to uncountable routes. [#3930 state:resolved]
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index 4821b5986c..10cc4dfb4f 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -113,7 +113,7 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
resources :posts, :only => [:index, :show] do
resources :comments, :except => :destroy
end
-
+
resources :sheep
match 'sprockets.js' => ::TestRoutingMapper::SprocketsApp
@@ -532,11 +532,13 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
assert_raise(ActionController::RoutingError) { delete '/posts/1/comments' }
end
end
-
+
def test_resources_for_uncountable_names
with_test_routes do
assert_equal '/sheep', sheep_index_path
assert_equal '/sheep/1', sheep_path(1)
+ assert_equal '/sheep/new', new_sheep_path
+ assert_equal '/sheep/1/edit', edit_sheep_path(1)
end
end