Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add tests for the case where size is explicitly passed to number_fiel…

…d helper
  • Loading branch information...
commit cb06727b6cb7310808f5b9ce1bf254055806ba80 1 parent 76dedf0
@vijaydev vijaydev authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 actionpack/test/template/form_helper_test.rb
View
4 actionpack/test/template/form_helper_test.rb
@@ -440,11 +440,15 @@ def test_email_field
def test_number_field
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))
+ expected = %{<input name="order[quantity]" size="30" max="9" id="order_quantity" type="number" min="1" />}
+ assert_dom_equal(expected, number_field("order", "quantity", :size => 30, :in => 1...10))
end
def test_range_input
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))
+ expected = %{<input name="hifi[volume]" step="0.1" size="30" max="11" id="hifi_volume" type="range" min="0" />}
+ assert_dom_equal(expected, range_field("hifi", "volume", :size => 30, :in => 0..11, :step => 0.1))
end
def test_explicit_name
Please sign in to comment.
Something went wrong with that request. Please try again.