Permalink
Browse files

[popup unit tests] Modify test that checks whether popup emits "popup…

…afterclose" upon destroy() to first open the popup
  • Loading branch information...
gabrielschulhof committed Oct 4, 2012
1 parent 616ae09 commit 4926901106181c5bc38021d2917b9f21cfbc1233
Showing with 10 additions and 7 deletions.
  1. +10 −7 tests/unit/popup/popup_core.js
@@ -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.