]> source.dussan.org Git - jquery-ui.git/commitdiff
Button tests: Use domEqual() to test destroy().
authorScott González <scott.gonzalez@gmail.com>
Sat, 16 Jun 2012 12:24:29 +0000 (08:24 -0400)
committerScott González <scott.gonzalez@gmail.com>
Sat, 16 Jun 2012 12:24:29 +0000 (08:24 -0400)
tests/unit/button/button_methods.js

index 347806d4e1bf56200b2aba71cd68a5bd740d477b..6a305d654ec67f4533df0dba420b632eba010f6d 100644 (file)
@@ -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);