aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-07-24 08:53:57 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-07-24 08:53:57 -0700
commit82a76dfd188223f2856fd92568f51e088be44f31 (patch)
tree4e7c1278b45a7a128d1e3e0b0b945a7119ab9930 /actionview/test
parent3a4d0b1e2975122defe86de31fc35ab2dcd9b984 (diff)
parent1424873948a98ab30ac4b5eed35d3de59a54b92a (diff)
downloadrails-82a76dfd188223f2856fd92568f51e088be44f31.tar.gz
rails-82a76dfd188223f2856fd92568f51e088be44f31.tar.bz2
rails-82a76dfd188223f2856fd92568f51e088be44f31.zip
Merge pull request #11570 from joelcogen/harmonize_text_field_and_area
text_area should handle nil value option like text_field
Diffstat (limited to 'actionview/test')
-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(