Skip to content
Permalink
Browse files

Selectmenu tests: Added test for widget() method.

  • Loading branch information
fnagel committed Aug 30, 2012
1 parent 66156aa commit fb87e1c557d347f11e123081c0b392aa5cd89532
Showing with 14 additions and 0 deletions.
  1. +14 −0 tests/unit/selectmenu/selectmenu_methods.js
@@ -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 );

0 comments on commit fb87e1c

Please sign in to comment.
You can’t perform that action at this time.