+ strictEqual( jQuery.Deferred().resolve( "test" ).invert().then(null,function(value) {
+ strictEqual( value, "test", "Resolved deferred => then fail callback called" );
+ }).fail(function( value ) {
+ strictEqual( value, "test", "Resolved deferred => fail callback called" );
+ }).isRejected(), true, "Invert promise is rejected when deferred is resolved" );
+
+ strictEqual( jQuery.Deferred().reject( "test" ).invert().then(function(value) {
+ strictEqual( value, "test", "Rejected deferred => then done callback called" );
+ }).done(function( value ) {
+ strictEqual( value, "test", "Rejected deferred => done callback called" );
+ }).isResolved(), true, "Invert promise is resolved when deferred is rejected" );
+