Permalink
Browse files

Add a test which ensures slugs in :id work.

  • Loading branch information...
1 parent 53e16d8 commit 772a0226fdbedcc16432e1fb42552678f282e973 @josevalim josevalim committed Mar 30, 2010
Showing with 8 additions and 0 deletions.
  1. +8 −0 actionpack/test/dispatch/routing_test.rb
@@ -533,6 +533,14 @@ def test_resource_routes_with_only_and_except
end
end
+ def test_resource_with_slugs_in_ids
+ with_test_routes do
+ get '/posts/rails-rocks'
+ assert_equal 'posts#show', @response.body
+ assert_equal '/posts/rails-rocks', post_path(:id => 'rails-rocks')
+ end
+ end
+
def test_resources_for_uncountable_names
with_test_routes do
assert_equal '/sheep', sheep_index_path

0 comments on commit 772a022

Please sign in to comment.