Skip to content
Permalink
Browse files

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

  • Loading branch information
scottgonzalez committed Jun 16, 2012
1 parent 67540fd commit 7c74af7b224ab1b016c644bdc9bc419ea82c75f0
Showing with 4 additions and 7 deletions.
  1. +4 −7 tests/unit/button/button_methods.js
@@ -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);

0 comments on commit 7c74af7

Please sign in to comment.
You can’t perform that action at this time.