aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-01-13 14:06:33 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-01-13 14:06:33 +0000
commit9c09f81bc6bc08122e2835fb59e66d80751bd058 (patch)
tree4658b70311e7e785f94d2006232b34640b387622 /actionpack/test
parent1d61071e7cba0d14a0f1a66b21d4af3656104e02 (diff)
downloadrails-9c09f81bc6bc08122e2835fb59e66d80751bd058.tar.gz
rails-9c09f81bc6bc08122e2835fb59e66d80751bd058.tar.bz2
rails-9c09f81bc6bc08122e2835fb59e66d80751bd058.zip
Added arrays as a value option for params in url_for and friends #467 [Eric Anderson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@403 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/url_test.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/actionpack/test/controller/url_test.rb b/actionpack/test/controller/url_test.rb
index b595b1c25c..8315830776 100644
--- a/actionpack/test/controller/url_test.rb
+++ b/actionpack/test/controller/url_test.rb
@@ -246,7 +246,18 @@ class UrlTest < Test::Unit::TestCase
)
end
end
-
+
+ def test_parameters_with_array
+ @clean_urls.each do |url|
+ assert_equal(
+ "http://www.singlefile.com/identity/show?id[]=3&id[]=5&id[]=10",
+ url.rewrite(
+ :action => "show",
+ :params => { 'id' => [ 3, 5, 10 ] } )
+ )
+ end
+ end
+
def test_action_with_id
assert_equal(
"http://www.singlefile.com/identity/show/7",