aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/form_options_helper_test.rb
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-08-11 14:04:21 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-08-11 14:04:22 -0300
commite8e8617c390776e6d7b21ca79b99503a8afb19ae (patch)
treeb4ab786784a97efb6d8ba7a48f233f444cb2f75c /actionpack/test/template/form_options_helper_test.rb
parentce06b8a56c5647b9b963c2331e3912fbc54e950c (diff)
downloadrails-e8e8617c390776e6d7b21ca79b99503a8afb19ae.tar.gz
rails-e8e8617c390776e6d7b21ca79b99503a8afb19ae.tar.bz2
rails-e8e8617c390776e6d7b21ca79b99503a8afb19ae.zip
Simplify html attributes generation for options_for_select
Further simplify the option_html_attributes method after the changes introduced in dacbcbe55745aa9e5484b10b11f65ccca7db1c54 to not escape the html options here (since they're going to be escaped down the chain in content tag).
Diffstat (limited to 'actionpack/test/template/form_options_helper_test.rb')
-rw-r--r--actionpack/test/template/form_options_helper_test.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/actionpack/test/template/form_options_helper_test.rb b/actionpack/test/template/form_options_helper_test.rb
index d234e6633c..e1ce5c5568 100644
--- a/actionpack/test/template/form_options_helper_test.rb
+++ b/actionpack/test/template/form_options_helper_test.rb
@@ -1164,11 +1164,12 @@ class FormOptionsHelperTest < ActionView::TestCase
)
end
- def test_option_html_attributes_from_without_hash
- assert_equal(
- {},
- option_html_attributes([ 'foo', 'bar' ])
- )
+ def test_option_html_attributes_with_no_array_element
+ assert_equal({}, option_html_attributes('foo'))
+ end
+
+ def test_option_html_attributes_without_hash
+ assert_equal({}, option_html_attributes([ 'foo', 'bar' ]))
end
def test_option_html_attributes_with_single_element_hash