jquery-ui/tests/unit/menu/menu_methods.js
dominiquevincent c821aa680c Menu:the first set of unit test files.
Signed-off-by: dominiquevincent <dominique.vincent@toitl.com>
2010-05-06 17:10:52 +02:00

20 lines
468 B
JavaScript

/*
* menu_methods.js
*/
(function($) {
module("menu: methods");
test("destroy", function() {
var beforeHtml = $("#menu1").find("div").css("font-style", "normal").end().parent().html();
var afterHtml = $("#menu1").menu().menu("destroy").parent().html();
// Opera 9 outputs role="" instead of removing the attribute like everyone else
if ($.browser.opera) {
afterHtml = afterHtml.replace(/ role=""/g, "");
}
equal( afterHtml, beforeHtml );
});
})(jQuery);