From 4582a3661724c2cda55a8f8ac53f37686ca72927 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Tue, 28 Jun 2016 14:22:42 -0700 Subject: - Added select tag test for verifying passing html options to f.select helper - Renamed test to be more descriptive --- actionview/test/template/form_options_helper_test.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'actionview') diff --git a/actionview/test/template/form_options_helper_test.rb b/actionview/test/template/form_options_helper_test.rb index 7a5904f151..a85f2da264 100644 --- a/actionview/test/template/form_options_helper_test.rb +++ b/actionview/test/template/form_options_helper_test.rb @@ -738,7 +738,7 @@ class FormOptionsHelperTest < ActionView::TestCase ) end - def test_empty + def test_select_with_empty @post = Post.new @post.category = "" assert_dom_equal( @@ -747,6 +747,15 @@ class FormOptionsHelperTest < ActionView::TestCase ) end + def test_select_with_html_options + @post = Post.new + @post.category = "" + assert_dom_equal( + "", + select("post", "category", [], { prompt: true, include_blank: true }, { class: 'disabled', disabled: true }) + ) + end + def test_select_with_nil @post = Post.new @post.category = "othervalue" -- cgit v1.2.3