diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-02-16 00:07:52 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-02-16 00:07:52 +0000 |
commit | 86cb0a61fb8e07388fdc026530ce113e93f5272d (patch) | |
tree | fac241c4e7de40261fbd96199499d452e8e37070 /actionpack/test/template | |
parent | 4ff26f51f61f9bf7d0bb34557e72c1280ee4f859 (diff) | |
download | rails-86cb0a61fb8e07388fdc026530ce113e93f5272d.tar.gz rails-86cb0a61fb8e07388fdc026530ce113e93f5272d.tar.bz2 rails-86cb0a61fb8e07388fdc026530ce113e93f5272d.zip |
Ensure that :confirm doesn't need extra quotes when using drop_receiving_element. Closes #8299 [thechrisoshow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8879 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/scriptaculous_helper_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/test/template/scriptaculous_helper_test.rb b/actionpack/test/template/scriptaculous_helper_test.rb index 8d55804fee..91856ff980 100644 --- a/actionpack/test/template/scriptaculous_helper_test.rb +++ b/actionpack/test/template/scriptaculous_helper_test.rb @@ -88,8 +88,10 @@ class ScriptaculousHelperTest < Test::Unit::TestCase drop_receiving_element("droptarget1", :accept => 'products', :update => 'infobox') assert_dom_equal %(<script type=\"text/javascript\">\n//<![CDATA[\nDroppables.add(\"droptarget1\", {accept:['tshirts','mugs'], onDrop:function(element){new Ajax.Updater('infobox', 'http://www.example.com/', {asynchronous:true, evalScripts:true, parameters:'id=' + encodeURIComponent(element.id)})}})\n//]]>\n</script>), drop_receiving_element("droptarget1", :accept => ['tshirts','mugs'], :update => 'infobox') - end + assert_dom_equal %(<script type=\"text/javascript\">\n//<![CDATA[\nDroppables.add("droptarget1", {hoverclass:'dropready', onDrop:function(element){if (confirm('Are you sure?')) { new Ajax.Request('http://www.example.com/update_drop', {asynchronous:true, evalScripts:true, parameters:'id=' + encodeURIComponent(element.id)}); }}})\n//]]>\n</script>), + drop_receiving_element('droptarget1', :hoverclass=>'dropready', :url=>{:action=>'update_drop'}, :confirm => 'Are you sure?') + end def protect_against_forgery? false end |