diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-10-07 16:56:18 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-10-07 16:56:18 -0700 |
commit | 7f64e472772293a3a5bbf4a435d937dabd98ed92 (patch) | |
tree | f7791372136a52d4ddd13cf696040fad074e2c3d /actionpack/test/template | |
parent | d2db917841cacbdd6320460fd6fa3d07cd972139 (diff) | |
download | rails-7f64e472772293a3a5bbf4a435d937dabd98ed92.tar.gz rails-7f64e472772293a3a5bbf4a435d937dabd98ed92.tar.bz2 rails-7f64e472772293a3a5bbf4a435d937dabd98ed92.zip |
just check to see that the first item in the list is an array
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/form_options_helper_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/template/form_options_helper_test.rb b/actionpack/test/template/form_options_helper_test.rb index 6aea991f7c..d3e0cc41a9 100644 --- a/actionpack/test/template/form_options_helper_test.rb +++ b/actionpack/test/template/form_options_helper_test.rb @@ -587,6 +587,15 @@ class FormOptionsHelperTest < ActionView::TestCase ) end + def test_empty + @post = Post.new + @post.category = "" + assert_dom_equal( + "<select id=\"post_category\" name=\"post[category]\"><option value=\"\">Please select</option>\n<option value=\"\"></option>\n</select>", + select("post", "category", [], :prompt => true, :include_blank => true) + ) + end + def test_select_with_selected_value @post = Post.new @post.category = "<mus>" |