aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/ajax.js44
1 files changed, 44 insertions, 0 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js
index 84d35188d..813c65fbc 100644
--- a/test/unit/ajax.js
+++ b/test/unit/ajax.js
@@ -398,6 +398,10 @@ test("$.ajax() - JSONP, Local", function() {
success: function(data){
ok( data.data, "JSON results returned (GET, no callback)" );
plus();
+ },
+ error: function(data){
+ ok( false, "Ajax error JSON (GET, no callback)" );
+ plus();
}
});
@@ -407,6 +411,10 @@ test("$.ajax() - JSONP, Local", function() {
success: function(data){
ok( data.data, "JSON results returned (GET, url callback)" );
plus();
+ },
+ error: function(data){
+ ok( false, "Ajax error JSON (GET, url callback)" );
+ plus();
}
});
@@ -417,6 +425,10 @@ test("$.ajax() - JSONP, Local", function() {
success: function(data){
ok( data.data, "JSON results returned (GET, data callback)" );
plus();
+ },
+ error: function(data){
+ ok( false, "Ajax error JSON (GET, data callback)" );
+ plus();
}
});
@@ -427,6 +439,10 @@ test("$.ajax() - JSONP, Local", function() {
success: function(data){
ok( data.data, "JSON results returned (GET, data obj callback)" );
plus();
+ },
+ error: function(data){
+ ok( false, "Ajax error JSON (GET, data obj callback)" );
+ plus();
}
});
@@ -437,6 +453,10 @@ test("$.ajax() - JSONP, Local", function() {
success: function(data){
ok( data.data, "JSON results returned (POST, no callback)" );
plus();
+ },
+ error: function(data){
+ ok( false, "Ajax error JSON (GET, data obj callback)" );
+ plus();
}
});
@@ -448,6 +468,10 @@ test("$.ajax() - JSONP, Local", function() {
success: function(data){
ok( data.data, "JSON results returned (POST, data callback)" );
plus();
+ },
+ error: function(data){
+ ok( false, "Ajax error JSON (POST, data callback)" );
+ plus();
}
});
@@ -459,6 +483,10 @@ test("$.ajax() - JSONP, Local", function() {
success: function(data){
ok( data.data, "JSON results returned (POST, data obj callback)" );
plus();
+ },
+ error: function(data){
+ ok( false, "Ajax error JSON (POST, data obj callback)" );
+ plus();
}
});
});
@@ -479,6 +507,10 @@ test("$.ajax() - JSONP, Remote", function() {
success: function(data){
ok( data.data, "JSON results returned (GET, no callback)" );
plus();
+ },
+ error: function(data){
+ ok( false, "Ajax error JSON (GET, no callback)" );
+ plus();
}
});
@@ -488,6 +520,10 @@ test("$.ajax() - JSONP, Remote", function() {
success: function(data){
ok( data.data, "JSON results returned (GET, url callback)" );
plus();
+ },
+ error: function(data){
+ ok( false, "Ajax error JSON (GET, url callback)" );
+ plus();
}
});
@@ -498,6 +534,10 @@ test("$.ajax() - JSONP, Remote", function() {
success: function(data){
ok( data.data, "JSON results returned (GET, data callback)" );
plus();
+ },
+ error: function(data){
+ ok( false, "Ajax error JSON (GET, data callback)" );
+ plus();
}
});
@@ -508,6 +548,10 @@ test("$.ajax() - JSONP, Remote", function() {
success: function(data){
ok( data.data, "JSON results returned (GET, data obj callback)" );
plus();
+ },
+ error: function(data){
+ ok( false, "Ajax error JSON (GET, data obj callback)" );
+ plus();
}
});
});