Permalink
Browse files

Add a routing test case covering #2101

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2256 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 7a4c881 commit 57e0cf8e958c553e91591141fd0c3c8c64c5d576 @seckar seckar committed Sep 18, 2005
Showing with 14 additions and 1 deletion.
  1. +2 −0 actionpack/CHANGELOG
  2. +12 −1 actionpack/test/controller/routing_test.rb
View
@@ -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]
@@ -897,7 +897,18 @@ def test_named_route_helper_array
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

0 comments on commit 57e0cf8

Please sign in to comment.