aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template
diff options
context:
space:
mode:
authorJoel Cogen <joel@redilio.us>2013-07-23 14:29:24 +0200
committerJoel Cogen <joel@redilio.us>2013-07-24 08:39:17 +0200
commit1424873948a98ab30ac4b5eed35d3de59a54b92a (patch)
tree4e7c1278b45a7a128d1e3e0b0b945a7119ab9930 /actionview/test/template
parent3a4d0b1e2975122defe86de31fc35ab2dcd9b984 (diff)
downloadrails-1424873948a98ab30ac4b5eed35d3de59a54b92a.tar.gz
rails-1424873948a98ab30ac4b5eed35d3de59a54b92a.tar.bz2
rails-1424873948a98ab30ac4b5eed35d3de59a54b92a.zip
text_area should handle nil value option like text_field
Diffstat (limited to 'actionview/test/template')
-rw-r--r--actionview/test/template/form_helper_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionview/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb
index f05b6d0d94..8cca43d7ca 100644
--- a/actionview/test/template/form_helper_test.rb
+++ b/actionview/test/template/form_helper_test.rb
@@ -676,6 +676,13 @@ class FormHelperTest < ActionView::TestCase
)
end
+ def test_text_area_with_nil_alternate_value
+ assert_dom_equal(
+ %{<textarea id="post_body" name="post[body]">\n</textarea>},
+ text_area("post", "body", value: nil)
+ )
+ end
+
def test_text_area_with_html_entities
@post.body = "The HTML Entity for & is &amp;"
assert_dom_equal(