Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
[popup unit tests] Modify test that checks whether popup emits "popup…
Browse files Browse the repository at this point in the history
…afterclose" upon destroy() to first open the popup
  • Loading branch information
Gabriel Schulhof committed Oct 4, 2012
1 parent 616ae09 commit 4926901
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tests/unit/popup/popup_core.js
Expand Up @@ -566,16 +566,19 @@
$popup.find( "a" ).click();
});

asyncTest( "Destroy closes the popup first", function() {
asyncTest( "Destroy closes open popup first", function() {
var $popup = $( "#test-destroy-popup" );

expect( 1 );

$popup.one( "popupafterclose", function() {
ok( true, "closed on destroy" );
start();
});

$popup.popup( "destroy" );
$popup
.one( "popupafterclose", function() {
ok( true, "closed on destroy" );
start();
})
.one( "popupafteropen", function() {
$popup.popup( "destroy" );
})
.popup( "open" );
});
})( jQuery );

0 comments on commit 4926901

Please sign in to comment.