From 57e0cf8e958c553e91591141fd0c3c8c64c5d576 Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Sun, 18 Sep 2005 14:11:24 +0000 Subject: Add a routing test case covering #2101 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2256 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/routing_test.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'actionpack/test/controller/routing_test.rb') diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index 0da376f519..c4ed527793 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -897,7 +897,18 @@ class RouteSetTests < Test::Unit::TestCase test_named_route_method assert_equal [:categories_url, :hash_for_categories_url], ::ActionController::Routing::NamedRoutes::Helpers end - + + def test_nil_defaults + rs.draw do + rs.connect 'journal', + :controller => 'content', + :action => 'list_journal', + :date => nil, :user_id => nil + rs.connect ':controller/:action/:id' + end + + assert_equal ['/journal', []], rs.generate(:controller => 'content', :action => 'list_journal', :date => nil, :user_id => nil) + end end end -- cgit v1.2.3