testrunner: refactored unbind's tests. Including one for #3538, passing since last...
[jquery.git] / test / unit / fx.js
index f8b6383..28fb92d 100644 (file)
@@ -34,21 +34,16 @@ test("animate option (queue === false)", function () {
        });
 });
 
-test("queue() defaults to 'fx' type", function () {
-       expect(2);
+test("animate non-element", function(){
+       expect(1);
        stop();
 
-       var $foo = jQuery("#foo");
-       $foo.queue("fx", [ "sample", "array" ]);
-       var arr = $foo.queue();
-       isSet(arr, [ "sample", "array" ], "queue() got an array set with type 'fx'");
-       $foo.queue([ "another", "one" ]);
-       var arr = $foo.queue("fx");
-       isSet(arr, [ "another", "one" ], "queue('fx') got an array set with no type");
-       // clean up after test
-       $foo.queue([]);
+       var obj = { test: 0 };
 
-       start();
+       jQuery(obj).animate({test: 200}, 200, function(){
+               equals( obj.test, 200, "The custom property should be modified." );
+               start();
+       });
 });
 
 test("stop()", function() {
@@ -155,13 +150,20 @@ test("stop(clearQueue, gotoEnd)", function() {
 });
 
 test("toggle()", function() {
-       expect(3);
+       expect(6);
        var x = jQuery("#foo");
        ok( x.is(":visible"), "is visible" );
        x.toggle();
        ok( x.is(":hidden"), "is hidden" );
        x.toggle();
        ok( x.is(":visible"), "is visible again" );
+       
+       x.toggle(true);
+       ok( x.is(":visible"), "is visible" );
+       x.toggle(false);
+       ok( x.is(":hidden"), "is hidden" );
+       x.toggle(true);
+       ok( x.is(":visible"), "is visible again" );
 });
 
 var visible = {