aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-12-04 05:30:28 +0000
committerRick Olson <technoweenie@gmail.com>2007-12-04 05:30:28 +0000
commit112ed3031671476d6aee3d0f69affe6c113e711f (patch)
treede2227945665dc8e64a3aee4acb891265d1fab9c /actionpack/test
parent9663f9952a4e5fb0698409b33a07c5fdd4206cd7 (diff)
downloadrails-112ed3031671476d6aee3d0f69affe6c113e711f.tar.gz
rails-112ed3031671476d6aee3d0f69affe6c113e711f.tar.bz2
rails-112ed3031671476d6aee3d0f69affe6c113e711f.zip
Add 'disabled' attribute to <OPTION> separators used in time zone and country selects. Closes #10354 [hasmanyjosh]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8267 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/form_options_helper_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/test/template/form_options_helper_test.rb b/actionpack/test/template/form_options_helper_test.rb
index e34e36f4e3..3d45984b83 100644
--- a/actionpack/test/template/form_options_helper_test.rb
+++ b/actionpack/test/template/form_options_helper_test.rb
@@ -187,7 +187,7 @@ class FormOptionsHelperTest < Test::Unit::TestCase
opts = time_zone_options_for_select( nil, zones )
assert_dom_equal "<option value=\"B\">B</option>\n" +
"<option value=\"E\">E</option>" +
- "<option value=\"\">-------------</option>\n" +
+ "<option value=\"\" disabled=\"disabled\">-------------</option>\n" +
"<option value=\"A\">A</option>\n" +
"<option value=\"C\">C</option>\n" +
"<option value=\"D\">D</option>",
@@ -199,7 +199,7 @@ class FormOptionsHelperTest < Test::Unit::TestCase
opts = time_zone_options_for_select( "E", zones )
assert_dom_equal "<option value=\"B\">B</option>\n" +
"<option value=\"E\" selected=\"selected\">E</option>" +
- "<option value=\"\">-------------</option>\n" +
+ "<option value=\"\" disabled=\"disabled\">-------------</option>\n" +
"<option value=\"A\">A</option>\n" +
"<option value=\"C\">C</option>\n" +
"<option value=\"D\">D</option>",
@@ -211,7 +211,7 @@ class FormOptionsHelperTest < Test::Unit::TestCase
opts = time_zone_options_for_select( "C", zones )
assert_dom_equal "<option value=\"B\">B</option>\n" +
"<option value=\"E\">E</option>" +
- "<option value=\"\">-------------</option>\n" +
+ "<option value=\"\" disabled=\"disabled\">-------------</option>\n" +
"<option value=\"A\">A</option>\n" +
"<option value=\"C\" selected=\"selected\">C</option>\n" +
"<option value=\"D\">D</option>",
@@ -663,7 +663,7 @@ COUNTRIES
@post.origin = "Denmark"
expected_select = <<-COUNTRIES
<select id="post_origin" name="post[origin]"><option value="New Zealand">New Zealand</option>
-<option value="Nicaragua">Nicaragua</option><option value="">-------------</option>
+<option value="Nicaragua">Nicaragua</option><option value="" disabled="disabled">-------------</option>
<option value="Afghanistan">Afghanistan</option>
<option value="Aland Islands">Aland Islands</option>
<option value="Albania">Albania</option>
@@ -919,7 +919,7 @@ COUNTRIES
@post.origin = "New Zealand"
expected_select = <<-COUNTRIES
<select id="post_origin" name="post[origin]"><option selected="selected" value="New Zealand">New Zealand</option>
-<option value="Nicaragua">Nicaragua</option><option value="">-------------</option>
+<option value="Nicaragua">Nicaragua</option><option value="" disabled="disabled">-------------</option>
<option value="Afghanistan">Afghanistan</option>
<option value="Aland Islands">Aland Islands</option>
<option value="Albania">Albania</option>
@@ -1289,7 +1289,7 @@ COUNTRIES
assert_dom_equal "<select id=\"firm_time_zone\" name=\"firm[time_zone]\">" +
"<option value=\"A\">A</option>\n" +
"<option value=\"D\" selected=\"selected\">D</option>" +
- "<option value=\"\">-------------</option>\n" +
+ "<option value=\"\" disabled=\"disabled\">-------------</option>\n" +
"<option value=\"B\">B</option>\n" +
"<option value=\"C\">C</option>\n" +
"<option value=\"E\">E</option>" +