aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/scriptaculous_helper_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-12-24 00:52:14 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-12-24 00:52:14 +0000
commit96536bebaefccabcbfb5ce9e689dd40c4fb4e294 (patch)
tree9000f9de158a5bce0ca7f6571637c1fa20361947 /actionpack/test/template/scriptaculous_helper_test.rb
parentaf60120d30157837d92b02953e04131facd1f7de (diff)
downloadrails-96536bebaefccabcbfb5ce9e689dd40c4fb4e294.tar.gz
rails-96536bebaefccabcbfb5ce9e689dd40c4fb4e294.tar.bz2
rails-96536bebaefccabcbfb5ce9e689dd40c4fb4e294.zip
Added :select option for JavaScriptMacroHelper#auto_complete_field that makes it easier to only use part of the auto-complete suggestion as the value for insertion [Thomas Fuchs]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3344 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template/scriptaculous_helper_test.rb')
-rw-r--r--actionpack/test/template/scriptaculous_helper_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/template/scriptaculous_helper_test.rb b/actionpack/test/template/scriptaculous_helper_test.rb
index fb8f745c7d..c185419c72 100644
--- a/actionpack/test/template/scriptaculous_helper_test.rb
+++ b/actionpack/test/template/scriptaculous_helper_test.rb
@@ -29,6 +29,15 @@ 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_parallel_effects
+ actual = parallel_effects(:duration => 2) do
+ visual_effect(:highlight, "posts") +
+ visual_effect(:fade, "fademe", :duration => 4.0)
+ end
+
+ assert_equal "new Effect.Parallel([new Effect.Highlight('posts',{});new Effect.Fade('fademe',{duration:4.0});], {duration:2})", actual
+ end
def test_sortable_element
assert_dom_equal %(<script type=\"text/javascript\">\n//<![CDATA[\nSortable.create('mylist', {onUpdate:function(){new Ajax.Request('http://www.example.com/order', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize('mylist')})}})\n//]]>\n</script>),