aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/CHANGELOG2
-rw-r--r--actionpack/test/controller/routing_test.rb13
2 files changed, 14 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index d625d0afaf..651710cc48 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Add a routing test case covering #2101 [Nicholas Seckar]
+
* Cache relative_url_root for all webservers, not just Apache #2193 [skae]
* Speed up cookie use by decreasing string copying #2194 [skae]
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