From 54213dadfde64e163d841056238b3c463aaa4212 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 20 Mar 2008 02:15:29 +0000 Subject: Docfixes (closes #11356, #11172, #10523) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9064 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/form_options_helper_test.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'actionpack/test/template/form_options_helper_test.rb') diff --git a/actionpack/test/template/form_options_helper_test.rb b/actionpack/test/template/form_options_helper_test.rb index 8ee601f478..f3ecc18233 100644 --- a/actionpack/test/template/form_options_helper_test.rb +++ b/actionpack/test/template/form_options_helper_test.rb @@ -31,6 +31,7 @@ class FormOptionsHelperTest < Test::Unit::TestCase Continent = Struct.new('Continent', :continent_name, :countries) Country = Struct.new('Country', :country_id, :country_name) Firm = Struct.new('Firm', :time_zone) + Album = Struct.new('Album', :id, :title, :genre) end def test_collection_options @@ -305,6 +306,18 @@ class FormOptionsHelperTest < Test::Unit::TestCase select("post", "category", %w( abe hest ), :selected => 'abe') ) end + + def test_select_with_index_option + @album = Album.new + @album.id = 1 + + expected = "" + + assert_dom_equal( + expected, + select("album[]", "genre", %w[rap rock country], {}, { :index => nil }) + ) + end def test_select_with_selected_nil @post = Post.new -- cgit v1.2.3