aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/form_tag_helper_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-07-01 12:55:19 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-07-01 12:55:19 -0700
commite7312105c73c20b286ebf17b16808001803e2c61 (patch)
tree3e23282353ffa6e6fc1ca53afc2e0b35f51a6274 /actionpack/test/template/form_tag_helper_test.rb
parent54f48517708d16e92bfc6bab6255f6299ca80af0 (diff)
parent1026d7706ffb467eac3cee8142d964bc2d30baa8 (diff)
downloadrails-e7312105c73c20b286ebf17b16808001803e2c61.tar.gz
rails-e7312105c73c20b286ebf17b16808001803e2c61.tar.bz2
rails-e7312105c73c20b286ebf17b16808001803e2c61.zip
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'actionpack/test/template/form_tag_helper_test.rb')
-rw-r--r--actionpack/test/template/form_tag_helper_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb
index 09d199b75d..f387123117 100644
--- a/actionpack/test/template/form_tag_helper_test.rb
+++ b/actionpack/test/template/form_tag_helper_test.rb
@@ -159,6 +159,18 @@ class FormTagHelperTest < ActionView::TestCase
assert_match VALID_HTML_ID, input_elem['id']
end
+ def test_text_area_tag_escape_content
+ actual = text_area_tag "body", "<b>hello world</b>", :size => "20x40"
+ expected = %(<textarea cols="20" id="body" name="body" rows="40">&lt;b&gt;hello world&lt;/b&gt;</textarea>)
+ assert_dom_equal expected, actual
+ end
+
+ def test_text_area_tag_unescaped_content
+ actual = text_area_tag "body", "<b>hello world</b>", :size => "20x40", :escape => false
+ expected = %(<textarea cols="20" id="body" name="body" rows="40"><b>hello world</b></textarea>)
+ assert_dom_equal expected, actual
+ end
+
def test_text_field_tag
actual = text_field_tag "title", "Hello!"
expected = %(<input id="title" name="title" type="text" value="Hello!" />)