From c16bd7c510cff4e0b01d9c191128af014523da7c Mon Sep 17 00:00:00 2001 From: kborchers Date: Thu, 19 Apr 2012 11:19:52 -0500 Subject: Menu tests: Don't pollute the global namespace with helpers. --- tests/unit/menu/menu_methods.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'tests/unit/menu/menu_methods.js') diff --git a/tests/unit/menu/menu_methods.js b/tests/unit/menu/menu_methods.js index 200ea4427..6ad7bc134 100644 --- a/tests/unit/menu/menu_methods.js +++ b/tests/unit/menu/menu_methods.js @@ -3,25 +3,28 @@ */ (function($) { +var log = TestHelpers.menu.log, + click = TestHelpers.menu.click; + module("menu: methods"); test( "enable/disable", function() { expect( 3 ); var menu = $( "#menu1" ).menu({ select: function(event, ui) { - menu_log(); + log(); } }); menu.menu("disable"); 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"); menu.menu("enable"); ok(menu.not(".ui-state-disabled"),"Has ui-state-disabled class"); - menu_log("click"); - menu_click(menu,"1"); - menu_log("afterclick"); + log("click"); + click(menu,"1"); + log("afterclick"); equal( $("#log").html(), "afterclick,1,click,afterclick,click,", "Click order not valid."); }); -- cgit v1.2.3