From 9c09f81bc6bc08122e2835fb59e66d80751bd058 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 13 Jan 2005 14:06:33 +0000 Subject: 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 --- actionpack/test/controller/url_test.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'actionpack/test') 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", -- cgit v1.2.3