Skip to content

Commit 11e719f

Browse files
committed
Updating autocomplete and button unit tests: use equal instead of ok to compare markup, works fine in latest QUnit (escapes all messages correctly)
1 parent b012de1 commit 11e719f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

tests/unit/autocomplete/autocomplete_methods.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ module("autocomplete: methods", {
1313
test("destroy", function() {
1414
var beforeHtml = $("#autocomplete").parent().html();
1515
var afterHtml = $("#autocomplete").autocomplete().autocomplete("destroy").parent().html();
16-
// TODO can't use same, as that would insert the markup unescaped into the test results, screwing up other tests
17-
ok( beforeHtml == afterHtml );
16+
equal( afterHtml, beforeHtml, "before/after html should be the same" );
1817
})
1918

2019
var data = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "perl"];

tests/unit/button/button_methods.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module("button: methods");
99
test("destroy", function() {
1010
var beforeHtml = $("#button").parent().html();
1111
var afterHtml = $("#button").button().button("destroy").parent().html();
12-
same( beforeHtml, afterHtml );
12+
equal( afterHtml, beforeHtml );
1313
});
1414

1515
})(jQuery);

0 commit comments

Comments
 (0)