From: Scott González Date: Sat, 16 Jun 2012 12:24:29 +0000 (-0400) Subject: Button tests: Use domEqual() to test destroy(). X-Git-Tag: 1.9.0-beta.1~23 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7c74af7b224ab1b016c644bdc9bc419ea82c75f0;p=jquery-ui.git Button tests: Use domEqual() to test destroy(). --- diff --git a/tests/unit/button/button_methods.js b/tests/unit/button/button_methods.js index 347806d4e..6a305d654 100644 --- a/tests/unit/button/button_methods.js +++ b/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);