Button tests: Use domEqual() to test destroy().

This commit is contained in:
Scott González 2012-06-16 08:24:29 -04:00
parent 67540fd539
commit 7c74af7b22

View File

@ -7,13 +7,10 @@
module("button: methods");
test("destroy", function() {
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 );
expect( 1 );
domEqual( "#button", function() {
$( "#button" ).button().button( "destroy" );
});
});
})(jQuery);