jquery-ui/tests/unit/button/button_methods.js

20 lines
429 B
JavaScript
Raw Normal View History

2010-01-20 14:00:14 +00:00
/*
* button_methods.js
*/
(function($) {
module("button: methods");
test("destroy", function() {
2012-04-19 14:50:09 +00:00
var beforeHtml = $("#button").parent().html(),
afterHtml = $("#button").button().button("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 );
2010-01-20 14:00:14 +00:00
});
})(jQuery);