diff options
Diffstat (limited to 'tests/unit/tooltip')
-rw-r--r-- | tests/unit/tooltip/tooltip_core.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/unit/tooltip/tooltip_core.js b/tests/unit/tooltip/tooltip_core.js index 710444b44..760ffeed2 100644 --- a/tests/unit/tooltip/tooltip_core.js +++ b/tests/unit/tooltip/tooltip_core.js @@ -154,4 +154,24 @@ asyncTest( "programmatic focus with async content", function() { element.focus(); }); +asyncTest( "destroy during hide animation; only one close event", function() { + expect( 1 ); + + var element = $( "#tooltipped1" ).tooltip({ + show: false, + hide: true + }); + + element.bind( "tooltipclose", function() { + ok( true, "tooltip closed" ); + }); + + element.tooltip( "open" ); + element.tooltip( "close" ); + setTimeout(function() { + element.tooltip( "destroy" ); + start(); + }); +}); + }( jQuery ) ); |