aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-02-18 23:53:18 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-02-18 23:53:18 +0000
commit5760a6cb3e3f3ce3b41c25023f3fbb875590c5bc (patch)
treed54fadf41808696740eee335a08efe8c4dccd7e1 /actionpack/test
parent519fe7ccbc5798aa957e9a8ea146bb825cd79b9e (diff)
downloadrails-5760a6cb3e3f3ce3b41c25023f3fbb875590c5bc.tar.gz
rails-5760a6cb3e3f3ce3b41c25023f3fbb875590c5bc.tar.bz2
rails-5760a6cb3e3f3ce3b41c25023f3fbb875590c5bc.zip
Clear route defaults using :name => nil #663
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@671 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/routing_tests.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/actionpack/test/controller/routing_tests.rb b/actionpack/test/controller/routing_tests.rb
index 69632c694f..91d7eedd21 100644
--- a/actionpack/test/controller/routing_tests.rb
+++ b/actionpack/test/controller/routing_tests.rb
@@ -185,7 +185,7 @@ class RouteTests < Test::Unit::TestCase
assert_equal nil, @route.recognize([])[0]
assert_equal nil, @route.recognize(%w{some_static route with more than expected})[0]
end
-
+
def test_basecamp
route 'clients/', :controller => 'content'
verify_generate('clients', {}, {:controller => 'content'}, {}) # Would like to have clients/
@@ -422,6 +422,11 @@ class RouteSetTests < Test::Unit::TestCase
@set.connect ':action/:controller'
verify_generate('index/content', options)
end
+
+ def test_default_dropped_with_nil_option
+ @request.path_parameters = {:controller => 'content', :action => 'action', :id => '10'}
+ verify_generate 'content/action', {:id => nil}
+ end
end
#require '../assertions/action_pack_assertions.rb'