diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/tag_helper_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/test/template/tag_helper_test.rb b/actionpack/test/template/tag_helper_test.rb index ef88cae5b8..2aa3d5b5fa 100644 --- a/actionpack/test/template/tag_helper_test.rb +++ b/actionpack/test/template/tag_helper_test.rb @@ -71,6 +71,19 @@ class TagHelperTest < ActionView::TestCase assert_equal '<p><b>Hello</b></p>', output_buffer end + def test_content_tag_with_escaped_array_class + str = content_tag('p', "limelight", :class => ["song", "play>"]) + assert_equal "<p class=\"song play>\">limelight</p>", str + + str = content_tag('p', "limelight", :class => ["song", "play"]) + assert_equal "<p class=\"song play\">limelight</p>", str + end + + def test_content_tag_with_unescaped_array_class + str = content_tag('p', "limelight", {:class => ["song", "play>"]}, false) + assert_equal "<p class=\"song play>\">limelight</p>", str + end + def test_cdata_section assert_equal "<![CDATA[<hello world>]]>", cdata_section("<hello world>") end |