diff options
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/prototype_helper_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/template/prototype_helper_test.rb b/actionpack/test/template/prototype_helper_test.rb index 56485bc21c..eef6841727 100644 --- a/actionpack/test/template/prototype_helper_test.rb +++ b/actionpack/test/template/prototype_helper_test.rb @@ -201,6 +201,14 @@ class JavaScriptGeneratorTest < Test::Unit::TestCase @generator.redirect_to(:action => 'welcome') end + def test_delay + @generator.delay(20) do + @generator.hide('foo') + end + + assert_equal "setTimeout(function() {\n;\nElement.hide(\"foo\");\n}, 20000);", @generator.to_s + end + def test_to_s @generator.insert_html(:top, 'element', '<p>This is a test</p>') @generator.insert_html(:bottom, 'element', '<p>This is a test</p>') |