Skip to content
This repository
Browse code

Fixes a number of tests that inexplicably didn't fail when we committ…

…ed the original patch
  • Loading branch information...
commit cf5b2b250f9d7014c06f91527f9bd1bbfa7f3bd6 1 parent 51d7b30
authored July 02, 2009
2  actionpack/test/template/active_record_helper_test.rb
@@ -171,7 +171,7 @@ def test_form_with_protect_against_forgery
171 171
     @request_forgery_protection_token = 'authenticity_token'
172 172
     @form_authenticity_token = '123'
173 173
     assert_dom_equal(
174  
-      %(<form action="create" method="post"><div style='margin:0;padding:0'><input type='hidden' name='authenticity_token' value='123' /></div><p><label for="post_title">Title</label><br /><input id="post_title" name="post[title]" size="30" type="text" value="Hello World" /></p>\n<p><label for="post_body">Body</label><br /><div class="fieldWithErrors"><textarea cols="40" id="post_body" name="post[body]" rows="20">Back to the hill and over it again!</textarea></div></p><input name="commit" type="submit" value="Create" /></form>),
  174
+      %(<form action="create" method="post"><div style='margin:0;padding:0;display:inline'><input type='hidden' name='authenticity_token' value='123' /></div><p><label for="post_title">Title</label><br /><input id="post_title" name="post[title]" size="30" type="text" value="Hello World" /></p>\n<p><label for="post_body">Body</label><br /><div class="fieldWithErrors"><textarea cols="40" id="post_body" name="post[body]" rows="20">Back to the hill and over it again!</textarea></div></p><input name="commit" type="submit" value="Create" /></form>),
175 175
       form("post")
176 176
     )
177 177
   end
10  actionpack/test/template/form_helper_test.rb
@@ -383,7 +383,7 @@ def test_form_for_with_method
383 383
 
384 384
     expected =
385 385
       "<form action='http://www.example.com' id='create-post' method='post'>" +
386  
-      "<div style='margin:0;padding:0'><input name='_method' type='hidden' value='put' /></div>" +
  386
+      "<div style='margin:0;padding:0;display:inline'><input name='_method' type='hidden' value='put' /></div>" +
387 387
       "<input name='post[title]' size='30' type='text' id='post_title' value='Hello World' />" +
388 388
       "<textarea name='post[body]' id='post_body' rows='20' cols='40'>Back to the hill and over it again!</textarea>" +
389 389
       "<input name='post[secret]' type='hidden' value='0' />" +
@@ -1092,7 +1092,7 @@ def test_form_for_with_record_url_option
1092 1092
   def test_form_for_with_existing_object
1093 1093
     form_for(@post) do |f| end
1094 1094
 
1095  
-    expected = "<form action=\"/posts/123\" class=\"edit_post\" id=\"edit_post_123\" method=\"post\"><div style=\"margin:0;padding:0\"><input name=\"_method\" type=\"hidden\" value=\"put\" /></div></form>"
  1095
+    expected = "<form action=\"/posts/123\" class=\"edit_post\" id=\"edit_post_123\" method=\"post\"><div style=\"margin:0;padding:0;display:inline\"><input name=\"_method\" type=\"hidden\" value=\"put\" /></div></form>"
1096 1096
     assert_equal expected, output_buffer
1097 1097
   end
1098 1098
 
@@ -1113,7 +1113,7 @@ def test_form_for_with_existing_object_in_list
1113 1113
 
1114 1114
     form_for([@post, @comment]) {}
1115 1115
 
1116  
-    expected = %(<form action="#{comment_path(@post, @comment)}" class="edit_comment" id="edit_comment_1" method="post"><div style="margin:0;padding:0"><input name="_method" type="hidden" value="put" /></div></form>)
  1116
+    expected = %(<form action="#{comment_path(@post, @comment)}" class="edit_comment" id="edit_comment_1" method="post"><div style="margin:0;padding:0;display:inline"><input name="_method" type="hidden" value="put" /></div></form>)
1117 1117
     assert_dom_equal expected, output_buffer
1118 1118
   end
1119 1119
 
@@ -1132,7 +1132,7 @@ def test_form_for_with_existing_object_and_namespace_in_list
1132 1132
 
1133 1133
     form_for([:admin, @post, @comment]) {}
1134 1134
 
1135  
-    expected = %(<form action="#{admin_comment_path(@post, @comment)}" class="edit_comment" id="edit_comment_1" method="post"><div style="margin:0;padding:0"><input name="_method" type="hidden" value="put" /></div></form>)
  1135
+    expected = %(<form action="#{admin_comment_path(@post, @comment)}" class="edit_comment" id="edit_comment_1" method="post"><div style="margin:0;padding:0;display:inline"><input name="_method" type="hidden" value="put" /></div></form>)
1136 1136
     assert_dom_equal expected, output_buffer
1137 1137
   end
1138 1138
 
@@ -1148,7 +1148,7 @@ def test_form_for_with_new_object_and_namespace_in_list
1148 1148
   def test_form_for_with_existing_object_and_custom_url
1149 1149
     form_for(@post, :url => "/super_posts") do |f| end
1150 1150
 
1151  
-    expected = "<form action=\"/super_posts\" class=\"edit_post\" id=\"edit_post_123\" method=\"post\"><div style=\"margin:0;padding:0\"><input name=\"_method\" type=\"hidden\" value=\"put\" /></div></form>"
  1151
+    expected = "<form action=\"/super_posts\" class=\"edit_post\" id=\"edit_post_123\" method=\"post\"><div style=\"margin:0;padding:0;display:inline\"><input name=\"_method\" type=\"hidden\" value=\"put\" /></div></form>"
1152 1152
     assert_equal expected, output_buffer
1153 1153
   end
1154 1154
 
6  actionpack/test/template/form_tag_helper_test.rb
@@ -40,13 +40,13 @@ def test_form_tag_multipart
40 40
 
41 41
   def test_form_tag_with_method_put
42 42
     actual = form_tag({}, { :method => :put })
43  
-    expected = %(<form action="http://www.example.com" method="post"><div style='margin:0;padding:0'><input type="hidden" name="_method" value="put" /></div>)
  43
+    expected = %(<form action="http://www.example.com" method="post"><div style='margin:0;padding:0;display:inline'><input type="hidden" name="_method" value="put" /></div>)
44 44
     assert_dom_equal expected, actual
45 45
   end
46 46
 
47 47
   def test_form_tag_with_method_delete
48 48
     actual = form_tag({}, { :method => :delete })
49  
-    expected = %(<form action="http://www.example.com" method="post"><div style='margin:0;padding:0'><input type="hidden" name="_method" value="delete" /></div>)
  49
+    expected = %(<form action="http://www.example.com" method="post"><div style='margin:0;padding:0;display:inline'><input type="hidden" name="_method" value="delete" /></div>)
50 50
     assert_dom_equal expected, actual
51 51
   end
52 52
 
@@ -62,7 +62,7 @@ def test_form_tag_with_block_and_method_in_erb
62 62
     __in_erb_template = ''
63 63
     form_tag("http://example.com", :method => :put) { concat "Hello world!" }
64 64
 
65  
-    expected = %(<form action="http://example.com" method="post"><div style='margin:0;padding:0'><input type="hidden" name="_method" value="put" /></div>Hello world!</form>)
  65
+    expected = %(<form action="http://example.com" method="post"><div style='margin:0;padding:0;display:inline'><input type="hidden" name="_method" value="put" /></div>Hello world!</form>)
66 66
     assert_dom_equal expected, output_buffer
67 67
   end
68 68
 
6  actionpack/test/template/prototype_helper_test.rb
@@ -136,7 +136,7 @@ def test_form_remote_tag
136 136
   end
137 137
 
138 138
   def test_form_remote_tag_with_method
139  
-    assert_dom_equal %(<form action=\"http://www.example.com/fast\" method=\"post\" onsubmit=\"new Ajax.Updater('glass_of_beer', 'http://www.example.com/fast', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;\"><div style='margin:0;padding:0'><input name='_method' type='hidden' value='put' /></div>),
  139
+    assert_dom_equal %(<form action=\"http://www.example.com/fast\" method=\"post\" onsubmit=\"new Ajax.Updater('glass_of_beer', 'http://www.example.com/fast', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;\"><div style='margin:0;padding:0;display:inline'><input name='_method' type='hidden' value='put' /></div>),
140 140
       form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast  }, :html => { :method => :put })
141 141
   end
142 142
 
@@ -164,7 +164,7 @@ def test_remote_form_for_with_record_identification_with_existing_record
164 164
     @record.save
165 165
     remote_form_for(@record) {}
166 166
 
167  
-    expected = %(<form action='#{author_path(@record)}' id='edit_author_1' method='post' onsubmit="new Ajax.Request('#{author_path(@record)}', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;" class='edit_author'><div style='margin:0;padding:0'><input name='_method' type='hidden' value='put' /></div></form>)
  167
+    expected = %(<form action='#{author_path(@record)}' id='edit_author_1' method='post' onsubmit="new Ajax.Request('#{author_path(@record)}', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;" class='edit_author'><div style='margin:0;padding:0;display:inline'><input name='_method' type='hidden' value='put' /></div></form>)
168 168
     assert_dom_equal expected, output_buffer
169 169
   end
170 170
 
@@ -180,7 +180,7 @@ def test_remote_form_for_with_existing_object_in_list
180 180
     @article.save
181 181
     remote_form_for([@author, @article]) {}
182 182
 
183  
-    expected = %(<form action='#{author_article_path(@author, @article)}' id='edit_article_1' method='post' onsubmit="new Ajax.Request('#{author_article_path(@author, @article)}', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;" class='edit_article'><div style='margin:0;padding:0'><input name='_method' type='hidden' value='put' /></div></form>)
  183
+    expected = %(<form action='#{author_article_path(@author, @article)}' id='edit_article_1' method='post' onsubmit="new Ajax.Request('#{author_article_path(@author, @article)}', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;" class='edit_article'><div style='margin:0;padding:0;display:inline'><input name='_method' type='hidden' value='put' /></div></form>)
184 184
     assert_dom_equal expected, output_buffer
185 185
   end
186 186
 

0 notes on commit cf5b2b2

Please sign in to comment.
Something went wrong with that request. Please try again.