diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-06-16 08:24:29 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-06-16 08:24:29 -0400 |
commit | 7c74af7b224ab1b016c644bdc9bc419ea82c75f0 (patch) | |
tree | af9d9a6be2167843038ace343c996048b804c028 | |
parent | 67540fd539b660c0eb3925d063014ff4e6c91667 (diff) | |
download | jquery-ui-7c74af7b224ab1b016c644bdc9bc419ea82c75f0.tar.gz jquery-ui-7c74af7b224ab1b016c644bdc9bc419ea82c75f0.zip |
Button tests: Use domEqual() to test destroy().
-rw-r--r-- | tests/unit/button/button_methods.js | 11 |
1 files 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); |