Skip to content

Commit 1faa785

Browse files
committed
+ 302 redirect test
1 parent 730db04 commit 1faa785

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

tests/json.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"status":200,"statusText":"OK","response":"done"}

tests/tests.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@ module('FileAPI');
572572
stop();
573573
FileAPI.support.html5 = false;
574574

575+
// default callback
575576
queue.inc();
576577
FileAPI.upload({
577578
url: 'http://rubaxa.org/FileAPI/server/ctrl.php',
@@ -582,6 +583,7 @@ module('FileAPI');
582583
}
583584
});
584585

586+
// callback in GET
585587
queue.inc();
586588
FileAPI.upload({
587589
url: 'http://rubaxa.org/FileAPI/server/ctrl.php?fn=?',
@@ -591,6 +593,16 @@ module('FileAPI');
591593
queue.next();
592594
}
593595
});
596+
597+
// 302: redirect
598+
queue.inc();
599+
FileAPI.upload({
600+
url: 'http://rubaxa.org/FileAPI/server/redirect.php?page=json.html',
601+
complete: function (err, xhr){
602+
equal(xhr.responseText, 'done', '302');
603+
queue.next();
604+
}
605+
});
594606
});
595607

596608

0 commit comments

Comments
 (0)