diff options
Diffstat (limited to 'actionpack/test/template/form_options_helper_test.rb')
-rw-r--r-- | actionpack/test/template/form_options_helper_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/template/form_options_helper_test.rb b/actionpack/test/template/form_options_helper_test.rb index 96d99367be..bfc73172eb 100644 --- a/actionpack/test/template/form_options_helper_test.rb +++ b/actionpack/test/template/form_options_helper_test.rb @@ -1137,6 +1137,13 @@ class FormOptionsHelperTest < ActionView::TestCase ) end + def test_options_for_select_with_data_element_with_special_characters + assert_dom_equal( + "<option value=\"<Denmark>\" data-test=\"<bold>\"><Denmark></option>", + options_for_select([ [ "<Denmark>", { :data => { :test => '<bold>' } } ] ]) + ) + end + def test_options_for_select_with_element_attributes_and_selection assert_dom_equal( "<option value=\"<Denmark>\"><Denmark></option>\n<option value=\"USA\" class=\"bold\" selected=\"selected\">USA</option>\n<option value=\"Sweden\">Sweden</option>", |