mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Button tests: Use domEqual() to test destroy().
This commit is contained in:
parent
67540fd539
commit
7c74af7b22
@ -7,13 +7,10 @@
|
|||||||
module("button: methods");
|
module("button: methods");
|
||||||
|
|
||||||
test("destroy", function() {
|
test("destroy", function() {
|
||||||
var beforeHtml = $("#button").parent().html(),
|
expect( 1 );
|
||||||
afterHtml = $("#button").button().button("destroy").parent().html();
|
domEqual( "#button", function() {
|
||||||
// Opera 9 outputs role="" instead of removing the attribute like everyone else
|
$( "#button" ).button().button( "destroy" );
|
||||||
if ($.browser.opera) {
|
});
|
||||||
afterHtml = afterHtml.replace(/ role=""/g, "");
|
|
||||||
}
|
|
||||||
equal( afterHtml, beforeHtml );
|
|
||||||
});
|
});
|
||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
Loading…
Reference in New Issue
Block a user