From f6ec296ad84ac7e321980cfdd8bba2ea6ce3a14b Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 1 May 2008 17:56:32 -0500 Subject: Fixed that TextHelper#text_field would corrypt when raw HTML was used as the value (mchenryc, Kevin Glowacz) [#80 state:resolved] --- actionpack/test/template/form_helper_test.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index b4857fcb62..204575fd89 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -104,6 +104,14 @@ class FormHelperTest < ActionView::TestCase ) end + def test_text_field_with_html_entities + @post.title = "The HTML Entity for & is &" + assert_dom_equal( + '', + text_field("post", "title") + ) + end + def test_text_field_with_options expected = '' assert_dom_equal expected, text_field("post", "title", "size" => 35) @@ -227,6 +235,14 @@ class FormHelperTest < ActionView::TestCase ) end + def test_text_area_with_html_entities + @post.body = "The HTML Entity for & is &" + assert_dom_equal( + '', + text_area("post", "body") + ) + end + def test_text_area_with_size_option assert_dom_equal( '', -- cgit v1.2.3