From 7c74af7b224ab1b016c644bdc9bc419ea82c75f0 Mon Sep 17 00:00:00 2001 From: Scott González Date: Sat, 16 Jun 2012 08:24:29 -0400 Subject: Button tests: Use domEqual() to test destroy(). --- tests/unit/button/button_methods.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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); -- cgit v1.2.3