From: Scott González Date: Mon, 27 Aug 2012 00:17:36 +0000 (-0400) Subject: Menu tests: Added test for widget() method. X-Git-Tag: 1.9.0~53 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2e491e0bb747da7dd1d465e78cc46e9c98237051;p=jquery-ui.git Menu tests: Added test for widget() method. --- diff --git a/tests/unit/menu/menu_methods.js b/tests/unit/menu/menu_methods.js index bfe974b06..f9241f27b 100644 --- a/tests/unit/menu/menu_methods.js +++ b/tests/unit/menu/menu_methods.js @@ -60,6 +60,14 @@ test( "refresh", function() { equal( element.find( ".ui-menu-item" ).length, 5, "Incorrect number of menu items" ); }); +test( "widget", function() { + expect( 2 ); + var element = $( "#menu1" ).menu(), + widgetElement = element.menu( "widget" ); + equal( widgetElement.length, 1, "one element" ); + strictEqual( widgetElement[ 0 ], element[ 0 ], "same element" ); +}); + // TODO: test focus method // TODO: test blur method