diff options
author | jzaefferer <joern.zaefferer@gmail.com> | 2010-03-27 08:00:03 +0100 |
---|---|---|
committer | jzaefferer <joern.zaefferer@gmail.com> | 2010-03-27 08:00:03 +0100 |
commit | 11e719f8f84468b7eac44fd19521ddf8eaa360f5 (patch) | |
tree | c8f30a0b85fff28bde9b10f0a0bf0d53cfc79b7d /tests | |
parent | b012de18a47607119fc47a49b22ff2376efa8972 (diff) | |
download | jquery-ui-11e719f8f84468b7eac44fd19521ddf8eaa360f5.tar.gz jquery-ui-11e719f8f84468b7eac44fd19521ddf8eaa360f5.zip |
Updating autocomplete and button unit tests: use equal instead of ok to compare markup, works fine in latest QUnit (escapes all messages correctly)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/autocomplete/autocomplete_methods.js | 3 | ||||
-rw-r--r-- | tests/unit/button/button_methods.js | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/tests/unit/autocomplete/autocomplete_methods.js b/tests/unit/autocomplete/autocomplete_methods.js index 5c20a6c95..76a600fe6 100644 --- a/tests/unit/autocomplete/autocomplete_methods.js +++ b/tests/unit/autocomplete/autocomplete_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"]; diff --git a/tests/unit/button/button_methods.js b/tests/unit/button/button_methods.js index 1fcd836b8..43c02d8cc 100644 --- a/tests/unit/button/button_methods.js +++ b/tests/unit/button/button_methods.js @@ -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); |