1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add a test which ensures slugs in :id work.

This commit is contained in:
José Valim 2010-03-31 00:11:10 +02:00
parent 53e16d8011
commit 772a0226fd

View file

@ -533,6 +533,14 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
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