diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-15 00:13:14 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-15 00:13:14 +0000 |
commit | 9015ce4cc243d4022e294b9062afe53d46910b06 (patch) | |
tree | c07463574516a89cfd10214681871d0f7983c705 /actionpack/test/template | |
parent | b55f59e811564604a86dcaba23e3d27c32812f17 (diff) | |
download | rails-9015ce4cc243d4022e294b9062afe53d46910b06.tar.gz rails-9015ce4cc243d4022e294b9062afe53d46910b06.tar.bz2 rails-9015ce4cc243d4022e294b9062afe53d46910b06.zip |
Fixed options_for_select on selected line issue #624 [Florian Weber]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@911 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/form_options_helper_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/template/form_options_helper_test.rb b/actionpack/test/template/form_options_helper_test.rb index a94f81a728..962d0c5069 100644 --- a/actionpack/test/template/form_options_helper_test.rb +++ b/actionpack/test/template/form_options_helper_test.rb @@ -94,6 +94,17 @@ class FormOptionsHelperTest < Test::Unit::TestCase ) end + def test_array_options_for_string_include_in_other_string_bug_fix + assert_equal( + "<option>ruby</option>\n<option selected=\"selected\">rubyonrails</option>", + options_for_select([ "ruby", "rubyonrails" ], "rubyonrails") + ) + assert_equal( + "<option selected=\"selected\">ruby</option>\n<option>rubyonrails</option>", + options_for_select([ "ruby", "rubyonrails" ], "ruby") + ) + end + def test_hash_options_for_select assert_equal( "<option value=\"<Kroner>\"><DKR></option>\n<option value=\"Dollar\">$</option>", |