diff options
Diffstat (limited to 'actionpack/test/template/form_tag_helper_test.rb')
-rw-r--r-- | actionpack/test/template/form_tag_helper_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb index 5e89cbbd54..c2cdd7666c 100644 --- a/actionpack/test/template/form_tag_helper_test.rb +++ b/actionpack/test/template/form_tag_helper_test.rb @@ -157,4 +157,24 @@ class FormTagHelperTest < Test::Unit::TestCase def test_pass assert_equal 1, 1 end + + def test_fieldset_tag + _erbout = '' + fieldset_tag("Your details") { _erbout.concat "Hello world!" } + + expected = %(<fieldset><legend>Your details</legend>Hello world!</fieldset>) + assert_dom_equal expected, _erbout + + _erbout = '' + fieldset_tag { _erbout.concat "Hello world!" } + + expected = %(<fieldset>Hello world!</fieldset>) + assert_dom_equal expected, _erbout + + _erbout = '' + fieldset_tag('') { _erbout.concat "Hello world!" } + + expected = %(<fieldset>Hello world!</fieldset>) + assert_dom_equal expected, _erbout + end end |