diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2005-09-18 14:11:24 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2005-09-18 14:11:24 +0000 |
commit | 57e0cf8e958c553e91591141fd0c3c8c64c5d576 (patch) | |
tree | dd6647a287e23fee45b5347651ce3d3adbbd6429 /actionpack/test | |
parent | 7a4c88157f111f947a64f8e74de6d9c258dade45 (diff) | |
download | rails-57e0cf8e958c553e91591141fd0c3c8c64c5d576.tar.gz rails-57e0cf8e958c553e91591141fd0c3c8c64c5d576.tar.bz2 rails-57e0cf8e958c553e91591141fd0c3c8c64c5d576.zip |
Add a routing test case covering #2101
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2256 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 13 |
1 files changed, 12 insertions, 1 deletions
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 |