aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2011-10-04 12:08:46 -0400
committerjaubourg <j@ubourg.net>2011-10-04 12:08:46 -0400
commit749d32a290d8d22a662ffc18db2fb035b401564d (patch)
treee82244a8c3e79ea1d11157731c538a5697cf13c9 /test/unit
parent11b76147c2d6fb23bee94a2a902e401b5b8f9755 (diff)
downloadjquery-749d32a290d8d22a662ffc18db2fb035b401564d.tar.gz
jquery-749d32a290d8d22a662ffc18db2fb035b401564d.zip
isProgressing becomes isPending. Unit tests added.
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/deferred.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/unit/deferred.js b/test/unit/deferred.js
index de74aeccd..f8232f9cc 100644
--- a/test/unit/deferred.js
+++ b/test/unit/deferred.js
@@ -8,7 +8,7 @@ jQuery.each( [ "", " - new operator" ], function( _, withNew ) {
test("jQuery.Deferred" + withNew, function() {
- expect( 14 );
+ expect( 20 );
createDeferred().resolve().then( function() {
ok( true , "Success on resolve" );
@@ -37,6 +37,7 @@ jQuery.each( [ "", " - new operator" ], function( _, withNew ) {
jQuery.each( "resolve reject".split( " " ), function( _, change ) {
createDeferred( function( defer ) {
+ ok( defer.isPending(), "pending after creation" );
var checked = 0;
defer.progress(function( value ) {
strictEqual( value, checked, "Progress: right value (" + value + ") received" );
@@ -44,7 +45,9 @@ jQuery.each( [ "", " - new operator" ], function( _, withNew ) {
for( checked = 0; checked < 3 ; checked++ ) {
defer.notify( checked );
}
+ ok( defer.isPending(), "pending after notification" );
defer[ change ]();
+ ok( !defer.isPending(), "not pending after " + change );
defer.notify();
});
});