diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-04-16 14:02:14 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-04-16 14:02:14 -0700 |
commit | 169273227184f3bc1fc85ba61f76cbedfcfb3338 (patch) | |
tree | cb1db63eec79e993c4e863e113e30fda7dcd90a0 /actionpack/test | |
parent | ef7a48df7584b038c6e3e0f1dbca5749310ef9f6 (diff) | |
parent | 0778290b57433da3bcd707fce222b8f646b7de4f (diff) | |
download | rails-169273227184f3bc1fc85ba61f76cbedfcfb3338.tar.gz rails-169273227184f3bc1fc85ba61f76cbedfcfb3338.tar.bz2 rails-169273227184f3bc1fc85ba61f76cbedfcfb3338.zip |
Merge pull request #10173 from nashby/element-attributes
options_from_collection_for_select helper takes html attributes
Diffstat (limited to 'actionpack/test')
-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 94ae8549f7..1715902927 100644 --- a/actionpack/test/template/form_options_helper_test.rb +++ b/actionpack/test/template/form_options_helper_test.rb @@ -100,6 +100,13 @@ class FormOptionsHelperTest < ActionView::TestCase ) end + def test_collection_options_with_element_attributes + assert_dom_equal( + "<option value=\"USA\" class=\"bold\">USA</option>", + options_from_collection_for_select([[ "USA", "USA", { :class => 'bold' } ]], :first, :second) + ) + end + def test_string_options_for_select options = "<option value=\"Denmark\">Denmark</option><option value=\"USA\">USA</option><option value=\"Sweden\">Sweden</option>" assert_dom_equal( |