diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-08-21 09:37:13 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-08-21 13:44:54 -0300 |
commit | c091fae21f32250b19475f124c3b680dbbc163d9 (patch) | |
tree | ef563d9d74478f98b3c09008bf90de5a27408133 /actionpack/test | |
parent | 8905c1fb496641c3cdb7b3b816ae6d3d4b2c2b73 (diff) | |
download | rails-c091fae21f32250b19475f124c3b680dbbc163d9.tar.gz rails-c091fae21f32250b19475f124c3b680dbbc163d9.tar.bz2 rails-c091fae21f32250b19475f124c3b680dbbc163d9.zip |
Merge pull request #7410 from sandeepravi/default_options_helper_value
option_tags coerced to "" instead of nil
Closes #7404
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/form_tag_helper_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb index 6f0d0c3561..21ee5c4706 100644 --- a/actionpack/test/template/form_tag_helper_test.rb +++ b/actionpack/test/template/form_tag_helper_test.rb @@ -220,6 +220,18 @@ class FormTagHelperTest < ActionView::TestCase assert_dom_equal expected, actual end + def test_select_tag_with_nil_option_tags_and_include_blank + actual = select_tag "places", nil, :include_blank => true + expected = %(<select id="places" name="places"><option value=""></option></select>) + assert_dom_equal expected, actual + end + + def test_select_tag_with_nil_option_tags_and_prompt + actual = select_tag "places", nil, :prompt => "string" + expected = %(<select id="places" name="places"><option value="">string</option></select>) + assert_dom_equal expected, actual + end + def test_text_area_tag_size_string actual = text_area_tag "body", "hello world", "size" => "20x40" expected = %(<textarea cols="20" id="body" name="body" rows="40">\nhello world</textarea>) |