aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2010-03-31 19:49:29 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2010-03-31 19:51:54 -0700
commit3859828d89d378986af0fc2390608b00aad5e912 (patch)
treecc6fb043b3b28eef6386b226cea40e74c3948710 /actionpack/test
parent8dfa27669bf75f616ecaaccb61b99ec177b3b854 (diff)
downloadrails-3859828d89d378986af0fc2390608b00aad5e912.tar.gz
rails-3859828d89d378986af0fc2390608b00aad5e912.tar.bz2
rails-3859828d89d378986af0fc2390608b00aad5e912.zip
HTML safety: give a deprecation warning if an array of option tags is passed to select tag. Be sure to join the tag yourself and mark them .html_safe
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/form_tag_helper_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb
index 868a35c476..1f26840289 100644
--- a/actionpack/test/template/form_tag_helper_test.rb
+++ b/actionpack/test/template/form_tag_helper_test.rb
@@ -158,6 +158,12 @@ class FormTagHelperTest < ActionView::TestCase
assert_dom_equal expected, actual
end
+ def test_select_tag_with_array_options
+ assert_deprecated /array/ do
+ select_tag "people", ["<option>david</option>"]
+ end
+ end
+
def test_text_area_tag_size_string
actual = text_area_tag "body", "hello world", "size" => "20x40"
expected = %(<textarea cols="20" id="body" name="body" rows="40">hello world</textarea>)