git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implemented global ajax settings - no documentation yet
[jquery.git]
/
src
/
ajax
/
ajaxTest.js
diff --git
a/src/ajax/ajaxTest.js
b/src/ajax/ajaxTest.js
index
1cd072f
..
1ae6bbf
100644
(file)
--- a/
src/ajax/ajaxTest.js
+++ b/
src/ajax/ajaxTest.js
@@
-127,6
+127,7
@@
test("test global handlers - failure", function() {
counter.error = counter.success = counter.complete = counter.send = 0;
$.ajaxTimeout(500);
$.ajax({url: "data/name.php?wait=5", global: false, beforeSend: send, success: success, error: error, complete: function() {
counter.error = counter.success = counter.complete = counter.send = 0;
$.ajaxTimeout(500);
$.ajax({url: "data/name.php?wait=5", global: false, beforeSend: send, success: success, error: error, complete: function() {
+ var x = counter;
ok( counter.error == 1, 'Check failed request without globals' );
ok( counter.success == 0, 'Check failed request without globals' );
ok( counter.complete == 0, 'Check failed request without globals' );
ok( counter.error == 1, 'Check failed request without globals' );
ok( counter.success == 0, 'Check failed request without globals' );
ok( counter.complete == 0, 'Check failed request without globals' );
@@
-331,4
+332,17
@@
test("$.ajax - beforeSend", function() {
start();
}
});
start();
}
});
-});
\ No newline at end of file
+});
+
+test("ajaxSetup()", function() {
+ expect(1);
+ stop();
+ $.ajaxSetup({
+ url: "data/name.php?name=foo",
+ success: function(msg){
+ ok( msg == 'bar', 'Check for GET' );
+ start();
+ }
+ });
+ $.ajax();
+});