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

index 1600d73dca119675ab6e00310ba7f302388de4e0..1bfa1055428a57abeb953d49c3229ffcc76fc3c6 100644 (file)
@@ -34,4 +34,12 @@ test( "search, close", function() {
        ok( menu.is( ":hidden" ), "menu is hidden after close" );
 });
 
+test( "widget", function() {
+       expect( 2 );
+       var element = $( "#autocomplete" ).autocomplete(),
+               widgetElement = element.autocomplete( "widget" );
+       equal( widgetElement.length, 1, "one element" );
+       ok( widgetElement.is( ".ui-menu" ), "menu element" );
+});
+
 }( jQuery ) );