]> source.dussan.org Git - jquery-ui.git/commitdiff
Selectmenu tests: test if close event is fired when selectmenu is closed by click...
authorFelix Nagel <info@felixnagel.com>
Thu, 30 May 2013 19:21:44 +0000 (21:21 +0200)
committerFelix Nagel <info@felixnagel.com>
Thu, 30 May 2013 19:21:44 +0000 (21:21 +0200)
tests/unit/selectmenu/selectmenu_events.js

index f1622adb98714457b68698a927e8821742330204..4d98c9dde3e444225e9350b025b06f8eb5cca458 100644 (file)
@@ -32,7 +32,7 @@ test( "change", function () {
 
 
 test( "close", function () {
-       expect( 2 );
+       expect( 4 );
 
        this.element.selectmenu({
                close: function ( event, ui ) {
@@ -40,8 +40,11 @@ test( "close", function () {
                        equal( event.type, "selectmenuclose", "event type set to selectmenuclose" );
                }
        });
-
+       
        this.element.selectmenu( "open" ).selectmenu( "close" );
+       
+       this.element.selectmenu( "open" );
+       $( "body" ).simulate( "click" );
 });