From 3384ee24adb1ac38fdadbb755523ffb9f6bda9cc Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Sat, 10 Mar 2012 23:30:39 +1300 Subject: Fixes #5324 by removing default size options from input:text and default cols and rows options from textarea. --- .../test/template/active_model_helper_test.rb | 6 +- actionpack/test/template/form_helper_test.rb | 324 ++++++++++----------- 2 files changed, 165 insertions(+), 165 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/template/active_model_helper_test.rb b/actionpack/test/template/active_model_helper_test.rb index 66a7bce71e..18468ee91a 100644 --- a/actionpack/test/template/active_model_helper_test.rb +++ b/actionpack/test/template/active_model_helper_test.rb @@ -29,14 +29,14 @@ class ActiveModelHelperTest < ActionView::TestCase def test_text_area_with_errors assert_dom_equal( - %(
), + %(
), text_area("post", "body") ) end def test_text_field_with_errors assert_dom_equal( - %(
), + %(
), text_field("post", "author_name") ) end @@ -76,7 +76,7 @@ class ActiveModelHelperTest < ActionView::TestCase end assert_dom_equal( - %(
can't be empty
), + %(
can't be empty
), text_field("post", "author_name") ) ensure diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 4eed5615f6..bc42e14b8a 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -249,35 +249,35 @@ class FormHelperTest < ActionView::TestCase end def test_label_with_block_in_erb - assert_equal "", view.render("test/label_with_block") + assert_equal "", view.render("test/label_with_block") end def test_text_field assert_dom_equal( - '', text_field("post", "title") + '', text_field("post", "title") ) assert_dom_equal( - '', password_field("post", "title") + '', password_field("post", "title") ) assert_dom_equal( - '', password_field("post", "title", :value => @post.title) + '', password_field("post", "title", :value => @post.title) ) assert_dom_equal( - '', password_field("person", "name") + '', password_field("person", "name") ) end def test_text_field_with_escapes @post.title = "Hello World" assert_dom_equal( - '', text_field("post", "title") + '', text_field("post", "title") ) end def test_text_field_with_html_entities @post.title = "The HTML Entity for & is &" assert_dom_equal( - '', + '', text_field("post", "title") ) end @@ -301,18 +301,18 @@ class FormHelperTest < ActionView::TestCase end def test_text_field_with_nil_value - expected = '' + expected = '' assert_dom_equal expected, text_field("post", "title", :value => nil) end def test_text_field_with_nil_name - expected = '' + expected = '' assert_dom_equal expected, text_field("post", "title", :name => nil) end def test_text_field_doesnt_change_param_values object_name = 'post[]' - expected = '' + expected = '' assert_equal expected, text_field(object_name, "title") assert_equal object_name, "post[]" end @@ -346,7 +346,7 @@ class FormHelperTest < ActionView::TestCase end def test_text_field_with_custom_type - assert_dom_equal '', + assert_dom_equal '', text_field("user", "email", :type => "email") end @@ -474,7 +474,7 @@ class FormHelperTest < ActionView::TestCase def test_text_area assert_dom_equal( - %{}, + %{}, text_area("post", "body") ) end @@ -482,14 +482,14 @@ class FormHelperTest < ActionView::TestCase def test_text_area_with_escapes @post.body = "Back to the hill and over it again!" assert_dom_equal( - %{}, + %{}, text_area("post", "body") ) end def test_text_area_with_alternate_value assert_dom_equal( - %{}, + %{}, text_area("post", "body", :value => 'Testing alternate values.') ) end @@ -497,7 +497,7 @@ class FormHelperTest < ActionView::TestCase def test_text_area_with_html_entities @post.body = "The HTML Entity for & is &" assert_dom_equal( - %{}, + %{}, text_area("post", "body") ) end @@ -510,12 +510,12 @@ class FormHelperTest < ActionView::TestCase end def test_search_field - expected = %{} + expected = %{} assert_dom_equal(expected, search_field("contact", "notes_query")) end def test_telephone_field - expected = %{} + expected = %{} assert_dom_equal(expected, telephone_field("user", "cell")) end @@ -546,12 +546,12 @@ class FormHelperTest < ActionView::TestCase end def test_url_field - expected = %{} + expected = %{} assert_dom_equal(expected, url_field("user", "homepage")) end def test_email_field - expected = %{} + expected = %{} assert_dom_equal(expected, email_field("user", "address")) end @@ -571,10 +571,10 @@ class FormHelperTest < ActionView::TestCase def test_explicit_name assert_dom_equal( - '', text_field("post", "title", "name" => "dont guess") + '', text_field("post", "title", "name" => "dont guess") ) assert_dom_equal( - %{}, + %{}, text_area("post", "body", "name" => "really!") ) assert_dom_equal( @@ -591,10 +591,10 @@ class FormHelperTest < ActionView::TestCase def test_explicit_id assert_dom_equal( - '', text_field("post", "title", "id" => "dont guess") + '', text_field("post", "title", "id" => "dont guess") ) assert_dom_equal( - %{}, + %{}, text_area("post", "body", "id" => "really!") ) assert_dom_equal( @@ -611,10 +611,10 @@ class FormHelperTest < ActionView::TestCase def test_nil_id assert_dom_equal( - '', text_field("post", "title", "id" => nil) + '', text_field("post", "title", "id" => nil) ) assert_dom_equal( - %{}, + %{}, text_area("post", "body", "id" => nil) ) assert_dom_equal( @@ -641,11 +641,11 @@ class FormHelperTest < ActionView::TestCase def test_index assert_dom_equal( - '', + '', text_field("post", "title", "index" => 5) ) assert_dom_equal( - %{}, + %{}, text_area("post", "body", "index" => 5) ) assert_dom_equal( @@ -668,11 +668,11 @@ class FormHelperTest < ActionView::TestCase def test_index_with_nil_id assert_dom_equal( - '', + '', text_field("post", "title", "index" => 5, 'id' => nil) ) assert_dom_equal( - %{}, + %{}, text_area("post", "body", "index" => 5, 'id' => nil) ) assert_dom_equal( @@ -700,10 +700,10 @@ class FormHelperTest < ActionView::TestCase label("post[]", "title") ) assert_dom_equal( - "", text_field("post[]","title") + "", text_field("post[]","title") ) assert_dom_equal( - "", + "", text_area("post[]", "body") ) assert_dom_equal( @@ -722,11 +722,11 @@ class FormHelperTest < ActionView::TestCase def test_auto_index_with_nil_id pid = 123 assert_dom_equal( - "", + "", text_field("post[]","title", :id => nil) ) assert_dom_equal( - "", + "", text_area("post[]", "body", :id => nil) ) assert_dom_equal( @@ -760,8 +760,8 @@ class FormHelperTest < ActionView::TestCase expected = whole_form("/posts/123", "create-post" , "edit_post", :method => 'patch') do "" + - "" + - "" + + "" + + "" + "" + "" + "" + @@ -859,7 +859,7 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form("/posts/44", "edit_post_44" , "edit_post", :method => 'patch') do - "" + + "" + "" end @@ -877,8 +877,8 @@ class FormHelperTest < ActionView::TestCase expected = whole_form("/posts/123", "create-post", "edit_other_name", :method => 'patch') do "" + - "" + - "" + + "" + + "" + "" + "" + "" @@ -895,8 +895,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form("/", "create-post", "edit_post", "delete") do - "" + - "" + + "" + + "" + "" + "" end @@ -912,8 +912,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form("/", "create-post", "edit_post", "delete") do - "" + - "" + + "" + + "" + "" + "" end @@ -929,7 +929,7 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form("/search", "search-post", "new_post", "get") do - "" + "" end assert_dom_equal expected, output_buffer @@ -943,8 +943,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form("/", "create-post", "edit_post", :method => 'patch', :remote => true) do - "" + - "" + + "" + + "" + "" + "" end @@ -960,8 +960,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form("/", "create-post", "edit_post", :method => 'patch', :remote => true) do - "" + - "" + + "" + + "" + "" + "" end @@ -979,8 +979,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form("/posts", 'new_post', 'new_post', :remote => true) do - "" + - "" + + "" + + "" + "" + "" end @@ -996,8 +996,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form("/", "create-post") do - "" + - "" + + "" + + "" + "" + "" end @@ -1015,8 +1015,8 @@ class FormHelperTest < ActionView::TestCase expected = whole_form('/posts/123', 'edit_post[]', 'edit_post[]', 'patch') do "" + - "" + - "" + + "" + + "" + "" + "" end @@ -1032,8 +1032,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post[]', 'edit_post[]', 'patch') do - "" + - "" + + "" + + "" + "" + "" end @@ -1049,8 +1049,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'namespace_edit_post_123', 'edit_post', 'patch') do - "" + - "" + + "" + + "" + "" + "" end @@ -1066,7 +1066,7 @@ class FormHelperTest < ActionView::TestCase expected = whole_form('/posts/123', 'namespace_edit_post_123', 'edit_post', 'patch') do "" + - "" + "" end assert_dom_equal expected, output_buffer @@ -1080,7 +1080,7 @@ class FormHelperTest < ActionView::TestCase expected_1 = whole_form('/posts/123', 'namespace_1_edit_post_123', 'edit_post', 'patch') do "" + - "" + "" end assert_dom_equal expected_1, output_buffer @@ -1092,7 +1092,7 @@ class FormHelperTest < ActionView::TestCase expected_2 = whole_form('/posts/123', 'namespace_2_edit_post_123', 'edit_post', 'patch') do "" + - "" + "" end assert_dom_equal expected_2, output_buffer @@ -1109,9 +1109,9 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'namespace_edit_post_123', 'edit_post', 'patch') do - "" + - "" + - "" + "" + + "" + + "" end assert_dom_equal expected, output_buffer @@ -1192,7 +1192,7 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - "" + "" end assert_dom_equal expected, output_buffer @@ -1207,8 +1207,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post[]', 'edit_post[]', 'patch') do - "" + - "" + "" + + "" end assert_dom_equal expected, output_buffer @@ -1223,8 +1223,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', 'patch') do - "" + - "" + "" + + "" end assert_dom_equal expected, output_buffer @@ -1238,7 +1238,7 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', 'patch') do - "" + "" end assert_dom_equal expected, output_buffer @@ -1252,7 +1252,7 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', 'patch') do - "" + "" end assert_dom_equal expected, output_buffer @@ -1266,7 +1266,7 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post[]', 'edit_post[]', 'patch') do - "" + "" end assert_dom_equal expected, output_buffer @@ -1294,7 +1294,7 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post[]', 'edit_post[]', 'patch') do - "" + "" end assert_dom_equal expected, output_buffer @@ -1314,9 +1314,9 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post[]', 'edit_post[]', 'patch') do - "" + "" end + whole_form('/posts/123', 'edit_post', 'edit_post', 'patch') do - "" + "" end assert_dom_equal expected, output_buffer @@ -1333,8 +1333,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + - '' + '' + + '' end assert_dom_equal expected, output_buffer @@ -1360,8 +1360,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + - '' + + '' + + '' + '' end @@ -1379,8 +1379,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + - '' + + '' + + '' + '' end @@ -1398,8 +1398,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + - '' + '' + + '' end assert_dom_equal expected, output_buffer @@ -1416,8 +1416,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + - '' + '' + + '' end assert_dom_equal expected, output_buffer @@ -1434,8 +1434,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + - '' + + '' + + '' + '' end @@ -1454,9 +1454,9 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + + '' + '' + - '' + '' end assert_dom_equal expected, output_buffer @@ -1475,10 +1475,10 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + - '' + + '' + + '' + '' + - '' + + '' + '' end @@ -1502,11 +1502,11 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + - '' + + '' + + '' + '' + - '' + - '' + '' + + '' end assert_dom_equal expected, output_buffer @@ -1529,10 +1529,10 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + - '' + - '' + - '' + '' + + '' + + '' + + '' end assert_dom_equal expected, output_buffer @@ -1555,11 +1555,11 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + - '' + + '' + + '' + '' + - '' + - '' + '' + + '' end assert_dom_equal expected, output_buffer @@ -1578,10 +1578,10 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + - '' + + '' + + '' + '' + - '' + + '' + '' end @@ -1602,11 +1602,11 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + + '' + '' + - '' + + '' + '' + - '' + '' end assert_dom_equal expected, output_buffer @@ -1625,9 +1625,9 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + - '' + - '' + '' + + '' + + '' end assert_dom_equal expected, output_buffer @@ -1646,10 +1646,10 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + - '' + + '' + + '' + '' + - '' + '' end assert_dom_equal expected, output_buffer @@ -1664,7 +1664,7 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + '' end assert_dom_equal expected, output_buffer @@ -1681,10 +1681,10 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + - '' + + '' + + '' + '' + - '' + + '' + '' end @@ -1702,10 +1702,10 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + - '' + + '' + + '' + '' + - '' + + '' + '' end @@ -1724,10 +1724,10 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + - '' + + '' + + '' + '' + - '' + + '' + '' end @@ -1747,10 +1747,10 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + - '' + + '' + + '' + '' + - '' + '' end assert_dom_equal expected, output_buffer @@ -1767,7 +1767,7 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + + '' + '' end @@ -1803,16 +1803,16 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + - '' + + '' + + '' + '' + '' + - '' + - '' + + '' + + '' + '' + '' + - '' + - '' + + '' + + '' + '' + '' end @@ -1830,7 +1830,7 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - '' + '' end assert_dom_equal expected, output_buffer @@ -1844,8 +1844,8 @@ class FormHelperTest < ActionView::TestCase end expected = - "" + - "" + + "" + + "" + "" + "" @@ -1860,8 +1860,8 @@ class FormHelperTest < ActionView::TestCase end expected = - "" + - "" + + "" + + "" + "" + "" @@ -1876,8 +1876,8 @@ class FormHelperTest < ActionView::TestCase end expected = - "" + - "" + + "" + + "" + "" + "" @@ -1892,8 +1892,8 @@ class FormHelperTest < ActionView::TestCase end expected = - "" + - "" + + "" + + "" + "" + "" @@ -1908,8 +1908,8 @@ class FormHelperTest < ActionView::TestCase end expected = - "" + - "" + + "" + + "" + "" + "" @@ -1924,8 +1924,8 @@ class FormHelperTest < ActionView::TestCase end expected = - "" + - "" + + "" + + "" + "" + "" @@ -1939,7 +1939,7 @@ class FormHelperTest < ActionView::TestCase end assert_dom_equal "" + - "", + "", output_buffer end @@ -1950,7 +1950,7 @@ class FormHelperTest < ActionView::TestCase end assert_dom_equal "" + - "", + "", output_buffer end @@ -1969,8 +1969,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'create-post', 'edit_post', :method => 'patch') do - "" + - "" + + "" + + "" + "" + "" end @@ -1989,9 +1989,9 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'create-post', 'edit_post', :method => 'patch') do - "" + - "" + - "" + "" + + "" + + "" end assert_dom_equal expected, output_buffer @@ -2005,7 +2005,7 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', 'patch') do - "" + "" end assert_dom_equal expected, output_buffer @@ -2029,8 +2029,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - "
" + - "
" + + "
" + + "
" + "
" end @@ -2048,8 +2048,8 @@ class FormHelperTest < ActionView::TestCase end expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'patch') do - "
" + - "
" + + "
" + + "
" + "
" end @@ -2066,8 +2066,8 @@ class FormHelperTest < ActionView::TestCase end expected = - "
" + - "
" + + "
" + + "
" + "
" assert_dom_equal expected, output_buffer -- cgit v1.2.3