diff options
author | Rafael Mendonça França <rafael.franca@plataformatec.com.br> | 2012-05-13 00:47:34 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-05-13 01:00:31 -0300 |
commit | 521e964411114a9ff8c95f4129ca7ade8f972d53 (patch) | |
tree | f748930bc4ec797ba706f6d122c7c9e9f9a8be00 /actionpack/test/template | |
parent | 30818561158dce27f3b0ae3f659a7bfdc867b834 (diff) | |
download | rails-521e964411114a9ff8c95f4129ca7ade8f972d53.tar.gz rails-521e964411114a9ff8c95f4129ca7ade8f972d53.tar.bz2 rails-521e964411114a9ff8c95f4129ca7ade8f972d53.zip |
Do not add `:include_blank` option if prompt is present
Diffstat (limited to 'actionpack/test/template')
-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 fee63b76c7..2cff91adda 100644 --- a/actionpack/test/template/form_options_helper_test.rb +++ b/actionpack/test/template/form_options_helper_test.rb @@ -648,6 +648,13 @@ class FormOptionsHelperTest < ActionView::TestCase ) end + def test_required_select_with_prompt + assert_dom_equal( + %(<select id="post_category" name="post[category]" required="required"><option value="">Select one</option>\n<option value="abe">abe</option>\n<option value="mus">mus</option>\n<option value="hest">hest</option></select>), + select("post", "category", %w(abe mus hest), { prompt: "Select one" }, required: true) + ) + end + def test_required_select_display_size_equals_to_one assert_dom_equal( %(<select id="post_category" name="post[category]" required="required" size="1"><option value=""></option>\n<option value="abe">abe</option>\n<option value="mus">mus</option>\n<option value="hest">hest</option></select>), |