aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/form_helper_test.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2010-01-30 14:39:41 -0600
committerJoshua Peek <josh@joshpeek.com>2010-01-30 14:39:59 -0600
commit4f7a85d2c66f100f83e2fe264e1f03bf079f13dc (patch)
treea9304cf3c3006b472da7e75cf339d6641160e728 /actionpack/test/template/form_helper_test.rb
parentac20f2cea15844b5cc06bdfefbb410fc55ba5caf (diff)
downloadrails-4f7a85d2c66f100f83e2fe264e1f03bf079f13dc.tar.gz
rails-4f7a85d2c66f100f83e2fe264e1f03bf079f13dc.tar.bz2
rails-4f7a85d2c66f100f83e2fe264e1f03bf079f13dc.zip
Revert "Merge branch 'rails/master' into ujs"
This reverts commit 3aa1ea1ae4baa4a03d03644e798eeb98a4745785, reversing changes made to 2c12a71378d2146c822acb389b00b866f6420ff5. Conflicts: actionpack/lib/action_view/helpers/javascript_helper.rb actionpack/lib/action_view/helpers/url_helper.rb actionpack/test/template/url_helper_test.rb
Diffstat (limited to 'actionpack/test/template/form_helper_test.rb')
-rw-r--r--actionpack/test/template/form_helper_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb
index 147d3dc05d..0c5c5d17ee 100644
--- a/actionpack/test/template/form_helper_test.rb
+++ b/actionpack/test/template/form_helper_test.rb
@@ -1232,7 +1232,7 @@ class FormHelperTest < ActionView::TestCase
# Perhaps this test should be moved to prototype helper tests.
def test_remote_form_for_with_labelled_builder
- self.extend ActionView::Helpers::AjaxHelper
+ self.extend ActionView::Helpers::PrototypeHelper
remote_form_for(:post, @post, :builder => LabelledFormBuilder) do |f|
concat f.text_field(:title)
@@ -1241,7 +1241,7 @@ class FormHelperTest < ActionView::TestCase
end
expected =
- %(<form action="http://www.example.com" data-remote="true" method="post">) +
+ %(<form action="http://www.example.com" onsubmit="new Ajax.Request('http://www.example.com', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;" method="post">) +
"<label for='title'>Title:</label> <input name='post[title]' size='30' type='text' id='post_title' value='Hello World' /><br/>" +
"<label for='body'>Body:</label> <textarea name='post[body]' id='post_body' rows='20' cols='40'>Back to the hill and over it again!</textarea><br/>" +
"<label for='secret'>Secret:</label> <input name='post[secret]' type='hidden' value='0' /><input name='post[secret]' checked='checked' type='checkbox' id='post_secret' value='1' /><br/>" +
@@ -1397,10 +1397,10 @@ class FormHelperTest < ActionView::TestCase
end
def test_remote_form_for_with_html_options_adds_options_to_form_tag
- self.extend ActionView::Helpers::AjaxHelper
+ self.extend ActionView::Helpers::PrototypeHelper
remote_form_for(:post, @post, :html => {:id => 'some_form', :class => 'some_class'}) do |f| end
- expected = "<form action=\"http://www.example.com\" class=\"some_class\" id=\"some_form\" method=\"post\" data-remote=\"true\"></form>"
+ expected = "<form action=\"http://www.example.com\" class=\"some_class\" id=\"some_form\" method=\"post\" onsubmit=\"new Ajax.Request('http://www.example.com', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;\"></form>"
assert_dom_equal expected, output_buffer
end