From e7d200f308f477a39dc4dfce5ee693143fb5602f Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Thu, 30 May 2013 21:21:44 +0200 Subject: Selectmenu tests: test if close event is fired when selectmenu is closed by click on body --- tests/unit/selectmenu/selectmenu_events.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/unit/selectmenu/selectmenu_events.js') diff --git a/tests/unit/selectmenu/selectmenu_events.js b/tests/unit/selectmenu/selectmenu_events.js index f1622adb9..4d98c9dde 100644 --- a/tests/unit/selectmenu/selectmenu_events.js +++ b/tests/unit/selectmenu/selectmenu_events.js @@ -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" ); }); -- cgit v1.2.3