From 2e491e0bb747da7dd1d465e78cc46e9c98237051 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Sun, 26 Aug 2012 20:17:36 -0400 Subject: [PATCH] Menu tests: Added test for widget() method. --- tests/unit/menu/menu_methods.js | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 2.39.5