aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-03-06 14:16:25 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-03-06 14:16:25 +0000
commit688f0f6712a37474e92f86de1046f5aa0e11030e (patch)
treee6d4d123281cd577600d80bff9ea776ef6ce3ceb /actionpack/test
parent6e5a7340e697e89ecab98b4c60ee346b8ed9a741 (diff)
downloadrails-688f0f6712a37474e92f86de1046f5aa0e11030e.tar.gz
rails-688f0f6712a37474e92f86de1046f5aa0e11030e.tar.bz2
rails-688f0f6712a37474e92f86de1046f5aa0e11030e.zip
Fixed that map.connect should convert arguments to strings #780 [Nicholas Seckar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@855 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/routing_tests.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_tests.rb b/actionpack/test/controller/routing_tests.rb
index 360ca06cf8..d4f954e590 100644
--- a/actionpack/test/controller/routing_tests.rb
+++ b/actionpack/test/controller/routing_tests.rb
@@ -490,6 +490,19 @@ class RouteSetTests < Test::Unit::TestCase
@set.add_route(@rails_route) if @set.empty?
assert_raises(ActionController::RoutingError) {@set.recognize!(@request)}
end
+
+ def test_generate_of_empty_url
+ @set.connect '', :controller => 'content', :action => 'view', :id => "1"
+ @set.add_route(@rails_route)
+ verify_generate('content/view/2', {:controller => 'content', :action => 'view', :id => 2})
+ verify_generate('', {:controller => 'content', :action => 'view', :id => 1})
+ end
+ def test_generate_of_empty_url_with_numeric_requirement
+ @set.connect '', :controller => 'content', :action => 'view', :id => 1
+ @set.add_route(@rails_route)
+ verify_generate('content/view/2', {:controller => 'content', :action => 'view', :id => 2})
+ verify_generate('', {:controller => 'content', :action => 'view', :id => 1})
+ end
end
#require '../assertions/action_pack_assertions.rb'