mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
add tests for the case where size is explicitly passed to number_field helper
This commit is contained in:
parent
76dedf0232
commit
cb06727b6c
1 changed files with 4 additions and 0 deletions
|
@ -440,11 +440,15 @@ class FormHelperTest < ActionView::TestCase
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue