mirror of
https://github.com/github/rails.git
synced 2026-01-31 01:08:19 -05:00
Test periodically_call_remote with frequency. Closes #7244 [Rich Collins]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6963 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -81,6 +81,13 @@ class PrototypeHelperTest < Test::Unit::TestCase
|
||||
periodically_call_remote(:update => "schremser_bier", :url => { :action => "mehr_bier" })
|
||||
end
|
||||
|
||||
def test_periodically_call_remote_with_frequency
|
||||
assert_dom_equal(
|
||||
"<script type=\"text/javascript\">\n//<![CDATA[\nnew PeriodicalExecuter(function() {new Ajax.Request('http://www.example.com/', {asynchronous:true, evalScripts:true})}, 2)\n//]]>\n</script>",
|
||||
periodically_call_remote(:frequency => 2)
|
||||
)
|
||||
end
|
||||
|
||||
def test_form_remote_tag
|
||||
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;\">),
|
||||
form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast })
|
||||
|
||||
Reference in New Issue
Block a user