aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-03-31 00:11:10 +0200
committerJosé Valim <jose.valim@gmail.com>2010-03-31 00:19:40 +0200
commit772a0226fdbedcc16432e1fb42552678f282e973 (patch)
tree29b70423271f6fecb3aa4c53384746d79bb23229 /actionpack/test/dispatch/routing_test.rb
parent53e16d8011fa2b356595775fbd93c9e3210b4b8a (diff)
downloadrails-772a0226fdbedcc16432e1fb42552678f282e973.tar.gz
rails-772a0226fdbedcc16432e1fb42552678f282e973.tar.bz2
rails-772a0226fdbedcc16432e1fb42552678f282e973.zip
Add a test which ensures slugs in :id work.
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index 10cc4dfb4f..e58653cb8c 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -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