aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/menu/menu_options.js
diff options
context:
space:
mode:
authorkborchers <kris.borchers@gmail.com>2012-04-19 11:19:52 -0500
committerkborchers <kris.borchers@gmail.com>2012-04-19 11:19:52 -0500
commitc16bd7c510cff4e0b01d9c191128af014523da7c (patch)
treefd50c26fd0a0408c0f44380a9f75dd618be2719e /tests/unit/menu/menu_options.js
parent163555d7bf27fe5d272e404de3c4439902710f54 (diff)
downloadjquery-ui-c16bd7c510cff4e0b01d9c191128af014523da7c.tar.gz
jquery-ui-c16bd7c510cff4e0b01d9c191128af014523da7c.zip
Menu tests: Don't pollute the global namespace with helpers.
Diffstat (limited to 'tests/unit/menu/menu_options.js')
-rw-r--r--tests/unit/menu/menu_options.js19
1 files changed, 11 insertions, 8 deletions
diff --git a/tests/unit/menu/menu_options.js b/tests/unit/menu/menu_options.js
index cda52d88d..e651fd2d1 100644
--- a/tests/unit/menu/menu_options.js
+++ b/tests/unit/menu/menu_options.js
@@ -3,6 +3,9 @@
*/
(function($) {
+var log = TestHelpers.menu.log,
+ click = TestHelpers.menu.click;
+
module("menu: options");
test( "{ disabled: true }", function() {
@@ -10,13 +13,13 @@ test( "{ disabled: true }", function() {
var menu = $( "#menu1" ).menu({
disabled: true,
select: function(event, ui) {
- menu_log();
+ log();
}
});
ok(menu.is(".ui-state-disabled"),"Missing ui-state-disabled class");
- menu_log("click",true);
- menu_click(menu,"1");
- menu_log("afterclick");
+ log("click",true);
+ click(menu,"1");
+ log("afterclick");
equal( $("#log").html(), "afterclick,click,", "Click order not valid.");
});
@@ -25,13 +28,13 @@ test( "{ disabled: false }", function() {
var menu = $( "#menu1" ).menu({
disabled: false,
select: function(event, ui) {
- menu_log();
+ log();
}
});
ok(menu.not(".ui-state-disabled"),"Has ui-state-disabled class");
- menu_log("click",true);
- menu_click(menu,"1");
- menu_log("afterclick");
+ log("click",true);
+ click(menu,"1");
+ log("afterclick");
equal( $("#log").html(), "afterclick,1,click,", "Click order not valid.");
});