aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/form_options_helper_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-05-16 20:51:33 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-05-16 20:53:28 -0300
commit6f04975272c901e59fe0f062ca76680c5cebfe6b (patch)
treef36e1ef238a2b3aa2e25bb4d7e538c11fa83ab3b /actionpack/test/template/form_options_helper_test.rb
parent7aa96a130b3050d3c1f0277f333a75a474df93b0 (diff)
downloadrails-6f04975272c901e59fe0f062ca76680c5cebfe6b.tar.gz
rails-6f04975272c901e59fe0f062ca76680c5cebfe6b.tar.bz2
rails-6f04975272c901e59fe0f062ca76680c5cebfe6b.zip
Test deprecation and fix the documentation of grouped_options_for_select
Diffstat (limited to 'actionpack/test/template/form_options_helper_test.rb')
-rw-r--r--actionpack/test/template/form_options_helper_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/template/form_options_helper_test.rb b/actionpack/test/template/form_options_helper_test.rb
index d6262a5ba1..048fb622ed 100644
--- a/actionpack/test/template/form_options_helper_test.rb
+++ b/actionpack/test/template/form_options_helper_test.rb
@@ -300,12 +300,12 @@ class FormOptionsHelperTest < ActionView::TestCase
assert_dom_equal(
"<optgroup label=\"----------\"><option value=\"US\">US</option>\n<option value=\"Canada\">Canada</option></optgroup><optgroup label=\"----------\"><option value=\"GB\">GB</option>\n<option value=\"Germany\">Germany</option></optgroup>",
- grouped_options_for_select([['US',"Canada"] , ["GB", "Germany"]], divider:"----------")
+ grouped_options_for_select([['US',"Canada"] , ["GB", "Germany"]], divider: "----------")
)
end
def test_grouped_options_for_select_with_selected_and_prompt_deprecated
- ActiveSupport::Deprecation.silence do
+ assert_deprecated 'Passing the prompt to grouped_options_for_select as an argument is deprecated. Please pass it in an options hash.' do
assert_dom_equal(
"<option value=\"\">Choose a product...</option><optgroup label=\"Hats\"><option value=\"Baseball Cap\">Baseball Cap</option>\n<option selected=\"selected\" value=\"Cowboy Hat\">Cowboy Hat</option></optgroup>",
grouped_options_for_select([["Hats", ["Baseball Cap","Cowboy Hat"]]], "Cowboy Hat", "Choose a product...")