aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorThomas Fuchs <thomas@fesch.at>2005-12-25 18:53:22 +0000
committerThomas Fuchs <thomas@fesch.at>2005-12-25 18:53:22 +0000
commiteb53467bdf7397503e7f709ae65a320b698e367b (patch)
tree2a0d3be7342486d056d78a3c3498fc7ab5d927d9 /actionpack/test
parent1455697ee85b3ad151213e48838e916c3cf96b0c (diff)
downloadrails-eb53467bdf7397503e7f709ae65a320b698e367b.tar.gz
rails-eb53467bdf7397503e7f709ae65a320b698e367b.tar.bz2
rails-eb53467bdf7397503e7f709ae65a320b698e367b.zip
Added support for toggling visual effects to ScriptaculousHelper::visual_effect, #3323.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3350 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/scriptaculous_helper_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/template/scriptaculous_helper_test.rb b/actionpack/test/template/scriptaculous_helper_test.rb
index c185419c72..b42d8f7f04 100644
--- a/actionpack/test/template/scriptaculous_helper_test.rb
+++ b/actionpack/test/template/scriptaculous_helper_test.rb
@@ -29,6 +29,16 @@ class ScriptaculousHelperTest < Test::Unit::TestCase
assert_equal "new Effect.Shake(element,{});", visual_effect(:shake)
assert_equal "new Effect.DropOut('dropme',{queue:'end'});", visual_effect(:drop_out, 'dropme', :queue => :end)
end
+
+ def test_toggle_effects
+ assert_equal "Effect.toggle('posts','appear',{});", visual_effect(:toggle_appear, "posts")
+ assert_equal "Effect.toggle('posts','slide',{});", visual_effect(:toggle_slide, "posts")
+ assert_equal "Effect.toggle('posts','blind',{});", visual_effect(:toggle_blind, "posts")
+ assert_equal "Effect.toggle('posts','appear',{});", visual_effect("toggle_appear", "posts")
+ assert_equal "Effect.toggle('posts','slide',{});", visual_effect("toggle_slide", "posts")
+ assert_equal "Effect.toggle('posts','blind',{});", visual_effect("toggle_blind", "posts")
+ end
+
def test_parallel_effects
actual = parallel_effects(:duration => 2) do