From 0778290b57433da3bcd707fce222b8f646b7de4f Mon Sep 17 00:00:00 2001 From: Vasiliy Ermolovich Date: Thu, 11 Apr 2013 14:15:33 +0300 Subject: options_from_collection_for_select helper takes html attributes as the last element of the array --- actionpack/test/template/form_options_helper_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actionpack/test/template') 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( + "", + options_from_collection_for_select([[ "USA", "USA", { :class => 'bold' } ]], :first, :second) + ) + end + def test_string_options_for_select options = "" assert_dom_equal( -- cgit v1.2.3