X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Ffx%2FfxTest.js;h=f7fb865f0fcc9c5e2d1512f58727b78b188c4625;hb=d7a8794eb574a870fde9a8afdfd452e52804f65d;hp=8c29de6383f943dd2519a2c0b3d290253bd60bba;hpb=7cc550727c4e0bcd93c5d435f0799f568fc74dfa;p=jquery.git diff --git a/src/fx/fxTest.js b/src/fx/fxTest.js index 8c29de6..f7fb865 100644 --- a/src/fx/fxTest.js +++ b/src/fx/fxTest.js @@ -1,12 +1,22 @@ module("fx"); -test("animate(Hash, Object, Function) - assert that animate doesn't modify its arguments", function() { +test("animate(Hash, Object, Function)", function() { expect(1); stop(); var hash = {opacity: 'show'}; var hashCopy = $.extend({}, hash); - $('#foo').animate(hash, 'fast', function() { + $('#foo').animate(hash, 0, function() { ok( hash.opacity == hashCopy.opacity, 'Check if animate changed the hash parameter' ); start(); }); +}); + +test("toggle()", function() { + expect(3); + var x = $("#foo"); + ok( x.is(":visible") ); + x.toggle(); + ok( x.is(":hidden") ); + x.toggle(); + ok( x.is(":visible") ); }); \ No newline at end of file