aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorAndrew Kaspick <andrew@redlinesoftware.com>2010-07-17 17:25:08 -0500
committerwycats <wycats@gmail.com>2010-07-21 10:04:55 -0700
commita1a41a3939318e9481469ea194660f3d8a9c1e66 (patch)
tree4cc0371cdfefc77fa2fa0bb362009218307ea6cc /actionpack/test
parentef5ae60a07c7d45855a9a2a4b695f153ef9faa79 (diff)
downloadrails-a1a41a3939318e9481469ea194660f3d8a9c1e66.tar.gz
rails-a1a41a3939318e9481469ea194660f3d8a9c1e66.tar.bz2
rails-a1a41a3939318e9481469ea194660f3d8a9c1e66.zip
remote_function patch with more detailed test
Signed-off-by: wycats <wycats@gmail.com>
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/prototype_helper_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/template/prototype_helper_test.rb b/actionpack/test/template/prototype_helper_test.rb
index 0ff37f44c2..036a44730c 100644
--- a/actionpack/test/template/prototype_helper_test.rb
+++ b/actionpack/test/template/prototype_helper_test.rb
@@ -104,6 +104,12 @@ class PrototypeHelperTest < PrototypeHelperBaseTest
assert_equal javascript_tag(create_generator(&block).to_s, {:defer => 'true'}), update_page_tag({:defer => 'true'}, &block)
end
+ def test_remote_function
+ res = remote_function(:url => authors_path, :with => "'author[name]='+$F('author_name')+'&author[dob]='+$F('author_dob')")
+ assert_equal "new Ajax.Request('/authors', {asynchronous:true, evalScripts:true, parameters:'author[name]='+$F('author_name')+'&author[dob]='+$F('author_dob')})", res
+ assert res.html_safe?
+ end
+
protected
def author_path(record)
"/authors/#{record.id}"