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:
parent
53e16d8011
commit
772a0226fd
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue