From 231a464d4e1795283410fb98b7740bed2b2e76a1 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 26 Feb 2006 01:07:05 +0000 Subject: Fixed that form elements would strip the trailing [] from the first parameter (closes #3545) [ruby@bobsilva.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/form_helper_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 20c90ea832..f0e1522807 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -68,6 +68,13 @@ class FormHelperTest < Test::Unit::TestCase assert_dom_equal expected, text_field("post", "title", :maxlength => 35) end + def test_text_field_doesnt_change_param_values + object_name = 'post[]' + expected = '' + assert_equal expected, text_field(object_name, "title") + assert_equal object_name, "post[]" + end + def test_check_box assert_dom_equal( '', -- cgit v1.2.3