Selectmenu tests: Added test for widget() method.

This commit is contained in:
Felix Nagel 2012-08-30 23:38:56 +02:00
parent 66156aa36b
commit fb87e1c557

View File

@ -128,5 +128,19 @@ test("refresh - disabled optgroup", function () {
}
});
test( "widget", function() {
expect( 4 );
var element = $('#speed').selectmenu(),
widgetElement = element.selectmenu( "widget" ),
menuWidgetElement = element.selectmenu( "menuWidget" );
element.selectmenu("refresh");
equal( widgetElement.length, 1, "widget: one element" );
ok( widgetElement.is("a.ui-button"), "widget: button element" );
equal( menuWidgetElement.length, 1, "menuWidget: one element" );
ok( menuWidgetElement.is("ul.ui-menu"), "menuWidget: menu element" );
});
})( jQuery );