Skip to content

Commit 7c74af7

Browse files
committed
Button tests: Use domEqual() to test destroy().
1 parent 67540fd commit 7c74af7

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

tests/unit/button/button_methods.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@
77
module("button: methods");
88

99
test("destroy", function() {
10-
var beforeHtml = $("#button").parent().html(),
11-
afterHtml = $("#button").button().button("destroy").parent().html();
12-
// Opera 9 outputs role="" instead of removing the attribute like everyone else
13-
if ($.browser.opera) {
14-
afterHtml = afterHtml.replace(/ role=""/g, "");
15-
}
16-
equal( afterHtml, beforeHtml );
10+
expect( 1 );
11+
domEqual( "#button", function() {
12+
$( "#button" ).button().button( "destroy" );
13+
});
1714
});
1815

1916
})(jQuery);

0 commit comments

Comments
 (0)