aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/routing_tests.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/routing_tests.rb')
-rw-r--r--actionpack/test/controller/routing_tests.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_tests.rb b/actionpack/test/controller/routing_tests.rb
index 744ccb1093..f36e395107 100644
--- a/actionpack/test/controller/routing_tests.rb
+++ b/actionpack/test/controller/routing_tests.rb
@@ -346,6 +346,13 @@ class RouteTests < Test::Unit::TestCase
verify_generate('id%2Fwith%2Fslashes', {},
{:controller => 'content', :action => 'fish', :id => 'id/with/slashes'}, {})
end
+
+ def test_generate_with_numeric_param
+ o = Object.new
+ def o.to_param() 10 end
+ verify_generate('content/action/10', {}, {:controller => 'content', :action => 'action', :id => o}, @defaults)
+ verify_generate('content/show/10', {}, {:controller => 'content', :action => 'show', :id => o}, @defaults)
+ end
end
class RouteSetTests < Test::Unit::TestCase