aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorWaseem Ahmad <talk.to.waseem@gmail.com>2011-11-04 15:03:02 +0530
committerWaseem Ahmad <talk.to.waseem@gmail.com>2011-11-04 15:03:02 +0530
commit56207a3f0165650abb273594f1f54fbb92bbf177 (patch)
tree950901d47f8ea412f941bc2479733139bf07823d /actionpack/test
parent533a9f84b035756eedf9fdccf0c494dc9701ba72 (diff)
downloadrails-56207a3f0165650abb273594f1f54fbb92bbf177.tar.gz
rails-56207a3f0165650abb273594f1f54fbb92bbf177.tar.bz2
rails-56207a3f0165650abb273594f1f54fbb92bbf177.zip
Remove 'size' attribute from number_field form helper fixes #3454
f.number_field generates <input type="number", size="30"../> which is invalid HTML5. See: http://dev.w3.org/html5/spec/Overview.html#number-state
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/form_helper_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb
index e36d032f6c..bd7b322fc9 100644
--- a/actionpack/test/template/form_helper_test.rb
+++ b/actionpack/test/template/form_helper_test.rb
@@ -438,12 +438,12 @@ class FormHelperTest < ActionView::TestCase
end
def test_number_field
- expected = %{<input name="order[quantity]" size="30" max="9" id="order_quantity" type="number" min="1" />}
+ expected = %{<input name="order[quantity]" max="9" id="order_quantity" type="number" min="1" />}
assert_dom_equal(expected, number_field("order", "quantity", :in => 1...10))
end
def test_range_input
- expected = %{<input name="hifi[volume]" step="0.1" size="30" max="11" id="hifi_volume" type="range" min="0" />}
+ expected = %{<input name="hifi[volume]" step="0.1" max="11" id="hifi_volume" type="range" min="0" />}
assert_dom_equal(expected, range_field("hifi", "volume", :in => 0..11, :step => 0.1))
end