aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/form_helper_test.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-06-20 23:13:19 +0200
committerXavier Noria <fxn@hashref.com>2010-06-20 23:13:19 +0200
commit207fa59675cb624dde0e01c1d57597f752cdf095 (patch)
tree472d03af5bc3e2df1b759717f723ca914f2a77aa /actionpack/test/template/form_helper_test.rb
parent31cadc730a40281950a265ff6982dd76cc326828 (diff)
parent50d37a76064239a731f81a4ba68b80946c4dfae2 (diff)
downloadrails-207fa59675cb624dde0e01c1d57597f752cdf095.tar.gz
rails-207fa59675cb624dde0e01c1d57597f752cdf095.tar.bz2
rails-207fa59675cb624dde0e01c1d57597f752cdf095.zip
Merge remote branch 'rails/master'
Conflicts: actionpack/lib/abstract_controller/base.rb
Diffstat (limited to 'actionpack/test/template/form_helper_test.rb')
-rw-r--r--actionpack/test/template/form_helper_test.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb
index 2f3869994c..8de1e782c0 100644
--- a/actionpack/test/template/form_helper_test.rb
+++ b/actionpack/test/template/form_helper_test.rb
@@ -644,6 +644,26 @@ class FormHelperTest < ActionView::TestCase
assert_dom_equal expected, output_buffer
end
+ def test_form_for_with_remote_without_html
+ assert_deprecated do
+ form_for(:post, @post, :remote => true) do |f|
+ concat f.text_field(:title)
+ concat f.text_area(:body)
+ concat f.check_box(:secret)
+ end
+ end
+
+ expected =
+ "<form action='http://www.example.com' method='post' data-remote='true'>" +
+ "<input name='post[title]' size='30' type='text' id='post_title' value='Hello World' />" +
+ "<textarea name='post[body]' id='post_body' rows='20' cols='40'>Back to the hill and over it again!</textarea>" +
+ "<input name='post[secret]' type='hidden' value='0' />" +
+ "<input name='post[secret]' checked='checked' type='checkbox' id='post_secret' value='1' />" +
+ "</form>"
+
+ assert_dom_equal expected, output_buffer
+ end
+
def test_form_for_without_object
form_for(:post, :html => { :id => 'create-post' }) do |f|
concat f.text_field(:title)