diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-05-24 20:47:03 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-05-24 20:47:03 +0000 |
commit | 74d1512b99e17c25de5ed42eb844374969847619 (patch) | |
tree | 302b57003c5f1993bdf0ac679a6e1255e76c891a /actionpack/test/template | |
parent | b290bc6b2f3ddefdfecd58d60bfa2517612dbad4 (diff) | |
download | rails-74d1512b99e17c25de5ed42eb844374969847619.tar.gz rails-74d1512b99e17c25de5ed42eb844374969847619.tar.bz2 rails-74d1512b99e17c25de5ed42eb844374969847619.zip |
Added option to suppress :size when using :maxlength for FormTagHelper#text_field #3112 [rails@tpope.info]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6830 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 0ee8c41d1b..134416c03b 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -86,6 +86,12 @@ class FormHelperTest < Test::Unit::TestCase assert_dom_equal expected, text_field("post", "title", :maxlength => 35) end + def test_text_field_removing_size + expected = '<input id="post_title" maxlength="35" name="post[title]" type="text" value="Hello World" />' + assert_dom_equal expected, text_field("post", "title", "maxlength" => 35, "size" => nil) + assert_dom_equal expected, text_field("post", "title", :maxlength => 35, :size => nil) + end + def test_text_field_doesnt_change_param_values object_name = 'post[]' expected = '<input id="post_123_title" name="post[123][title]" size="30" type="text" value="Hello World" />' |