diff options
author | Andrew Kaspick <andrew@redlinesoftware.com> | 2008-09-30 14:15:36 -0500 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-10-07 15:17:22 +0100 |
commit | dce6ade4cdc2833b53bd600ef10f9bce83c7102d (patch) | |
tree | 70774db6de17c2e5a4e82f7832b213288fab3d1a /actionpack/test | |
parent | 51b986619d88f7ba98be7d271188785cbbb541a0 (diff) | |
download | rails-dce6ade4cdc2833b53bd600ef10f9bce83c7102d.tar.gz rails-dce6ade4cdc2833b53bd600ef10f9bce83c7102d.tar.bz2 rails-dce6ade4cdc2833b53bd600ef10f9bce83c7102d.zip |
Ensure select_tag#name attribute uses [] when :multiple is true. [#1146 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/form_tag_helper_test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb index ad8baef5e4..1849a61f2f 100644 --- a/actionpack/test/template/form_tag_helper_test.rb +++ b/actionpack/test/template/form_tag_helper_test.rb @@ -211,7 +211,8 @@ class FormTagHelperTest < ActionView::TestCase def test_boolean_optios assert_dom_equal %(<input checked="checked" disabled="disabled" id="admin" name="admin" readonly="readonly" type="checkbox" value="1" />), check_box_tag("admin", 1, true, 'disabled' => true, :readonly => "yes") assert_dom_equal %(<input checked="checked" id="admin" name="admin" type="checkbox" value="1" />), check_box_tag("admin", 1, true, :disabled => false, :readonly => nil) - assert_dom_equal %(<select id="people" multiple="multiple" name="people"><option>david</option></select>), select_tag("people", "<option>david</option>", :multiple => true) + assert_dom_equal %(<select id="people" multiple="multiple" name="people[]"><option>david</option></select>), select_tag("people", "<option>david</option>", :multiple => true) + assert_dom_equal %(<select id="people[]" multiple="multiple" name="people[]"><option>david</option></select>), select_tag("people[]", "<option>david</option>", :multiple => true) assert_dom_equal %(<select id="people" name="people"><option>david</option></select>), select_tag("people", "<option>david</option>", :multiple => nil) end |