diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2011-11-04 16:44:59 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2011-11-04 22:32:40 +0530 |
commit | cb06727b6cb7310808f5b9ce1bf254055806ba80 (patch) | |
tree | de1aada8a09094583ec8803e33fae2c9ed1a63a6 /actionpack/test | |
parent | 76dedf0232c7a79d5b0ba4ef707f578558afeb44 (diff) | |
download | rails-cb06727b6cb7310808f5b9ce1bf254055806ba80.tar.gz rails-cb06727b6cb7310808f5b9ce1bf254055806ba80.tar.bz2 rails-cb06727b6cb7310808f5b9ce1bf254055806ba80.zip |
add tests for the case where size is explicitly passed to number_field helper
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index bd7b322fc9..6434d9645e 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -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 |