]> source.dussan.org Git - jquery-ui.git/commitdiff
Updating autocomplete and button unit tests: use equal instead of ok to compare marku...
authorjzaefferer <joern.zaefferer@gmail.com>
Sat, 27 Mar 2010 07:00:03 +0000 (08:00 +0100)
committerjzaefferer <joern.zaefferer@gmail.com>
Sat, 27 Mar 2010 07:00:03 +0000 (08:00 +0100)
tests/unit/autocomplete/autocomplete_methods.js
tests/unit/button/button_methods.js

index 5c20a6c95c61f4cd4a3c1c11802a1fb34063cbe4..76a600fe604c439033dff60e8680f3e388950f30 100644 (file)
@@ -13,8 +13,7 @@ module("autocomplete: methods", {
 test("destroy", function() {
        var beforeHtml = $("#autocomplete").parent().html();
        var afterHtml = $("#autocomplete").autocomplete().autocomplete("destroy").parent().html();
-       // TODO can't use same, as that would insert the markup unescaped into the test results, screwing up other tests
-       ok( beforeHtml == afterHtml );
+       equal( afterHtml, beforeHtml, "before/after html should be the same" );
 })
 
 var data = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "perl"];
index 1fcd836b898ab4094b4946e5ad7210ead0d73cce..43c02d8ccfb24ec418bfae8361d13b6867895078 100644 (file)
@@ -9,7 +9,7 @@ module("button: methods");
 test("destroy", function() {
        var beforeHtml = $("#button").parent().html();
        var afterHtml = $("#button").button().button("destroy").parent().html();
-       same( beforeHtml, afterHtml );
+       equal( afterHtml, beforeHtml );
 });
 
 })(jQuery);