Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a test which ensures slugs in :id work.

  • Loading branch information...
commit 772a0226fdbedcc16432e1fb42552678f282e973 1 parent 53e16d8
@josevalim josevalim authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 actionpack/test/dispatch/routing_test.rb
View
8 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
Please sign in to comment.
Something went wrong with that request. Please try again.