]> source.dussan.org Git - jquery-ui.git/commitdiff
Menu tests: Added test for widget() method.
authorScott González <scott.gonzalez@gmail.com>
Mon, 27 Aug 2012 00:17:36 +0000 (20:17 -0400)
committerScott González <scott.gonzalez@gmail.com>
Mon, 27 Aug 2012 00:17:36 +0000 (20:17 -0400)
tests/unit/menu/menu_methods.js

index bfe974b06bbe0c36b91d8db8c7dc8ffca47cab08..f9241f27b6993e0be6e3762c7d99c363d40eb571 100644 (file)
@@ -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