Skip to content
Permalink
Browse files

Updating autocomplete and button unit tests: use equal instead of ok …

…to compare markup, works fine in latest QUnit (escapes all messages correctly)
  • Loading branch information
jzaefferer committed Mar 27, 2010
1 parent b012de1 commit 11e719f8f84468b7eac44fd19521ddf8eaa360f5
Showing with 2 additions and 3 deletions.
  1. +1 −2 tests/unit/autocomplete/autocomplete_methods.js
  2. +1 −1 tests/unit/button/button_methods.js
@@ -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"];
@@ -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);

0 comments on commit 11e719f

Please sign in to comment.
You can’t perform that action at this time.