aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2012-08-30 23:38:56 +0200
committerFelix Nagel <info@felixnagel.com>2012-08-30 23:38:56 +0200
commitfb87e1c557d347f11e123081c0b392aa5cd89532 (patch)
tree9e442da92d52e5185a1592ce6062268355b998d5
parent66156aa36b0d7f1548b2ce39aaa73ef2b2cf5f0f (diff)
downloadjquery-ui-fb87e1c557d347f11e123081c0b392aa5cd89532.tar.gz
jquery-ui-fb87e1c557d347f11e123081c0b392aa5cd89532.zip
Selectmenu tests: Added test for widget() method.
-rw-r--r--tests/unit/selectmenu/selectmenu_methods.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/unit/selectmenu/selectmenu_methods.js b/tests/unit/selectmenu/selectmenu_methods.js
index 9d84e4787..d90098dcf 100644
--- a/tests/unit/selectmenu/selectmenu_methods.js
+++ b/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 );