aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorOleg Gaidarenko <markelog@gmail.com>2014-02-18 21:50:42 +0400
committerOleg Gaidarenko <markelog@gmail.com>2014-04-15 17:45:59 +0400
commitcd546aba748aeac09886921ebc1a5fcaa3778bf8 (patch)
tree06a30fe01c8d174240eef6f7ca398b5a948177ef /test
parentebbbe965b8408e145ebe4b3ffd183b169c29b75b (diff)
downloadjquery-cd546aba748aeac09886921ebc1a5fcaa3778bf8.tar.gz
jquery-cd546aba748aeac09886921ebc1a5fcaa3778bf8.zip
Tests: Improve jsonp tests
Since global variable for callback always would be equal to undefined value it better to check for boolean instead
Diffstat (limited to 'test')
-rw-r--r--test/unit/ajax.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js
index c099e12b1..fcdfcb0f5 100644
--- a/test/unit/ajax.js
+++ b/test/unit/ajax.js
@@ -733,7 +733,7 @@ module( "ajax", {
jsonpCallback: "functionToCleanUp",
success: function( data ) {
ok( data["data"], "JSON results returned (GET, custom callback name to be cleaned up)" );
- strictEqual( window["functionToCleanUp"], undefined, "Callback was removed (GET, custom callback name to be cleaned up)" );
+ strictEqual( window["functionToCleanUp"], true, "Callback was removed (GET, custom callback name to be cleaned up)" );
var xhr;
jQuery.ajax({
url: "data/jsonp.php",
@@ -747,7 +747,7 @@ module( "ajax", {
});
xhr.fail(function() {
ok( true, "Ajax error JSON (GET, custom callback name to be cleaned up)" );
- strictEqual( window["functionToCleanUp"], undefined, "Callback was removed after early abort (GET, custom callback name to be cleaned up)" );
+ strictEqual( window["functionToCleanUp"], true, "Callback was removed after early abort (GET, custom callback name to be cleaned up)" );
});
}
}, {