aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorDavid Serduke <davidserduke@gmail.com>2007-12-11 20:16:19 +0000
committerDavid Serduke <davidserduke@gmail.com>2007-12-11 20:16:19 +0000
commitc6a44c7943f460594a6a75081ad9bce76fea80f0 (patch)
treee31c3ca9bdf86d1108428c1ca9204e3690c5aed1 /test/unit
parent227f8b2514de31bd0b5c45ce6fc1b942c081f776 (diff)
downloadjquery-c6a44c7943f460594a6a75081ad9bce76fea80f0.tar.gz
jquery-c6a44c7943f460594a6a75081ad9bce76fea80f0.zip
Fix #1987 by only doing remote <script> type ajax with GET requests. All other types will be passed on to XMLHttpRequest.
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/ajax.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js
index 813c65fbc..40ec96415 100644
--- a/test/unit/ajax.js
+++ b/test/unit/ajax.js
@@ -573,6 +573,25 @@ test("$.ajax() - script, Remote", function() {
});
});
+test("$.ajax() - script, Remote with POST", function() {
+ expect(3);
+
+ var base = window.location.href.replace(/\?.*$/, "");
+
+ stop();
+
+ $.ajax({
+ url: base + "data/test.js",
+ type: "POST",
+ dataType: "script",
+ success: function(data, status){
+ ok( foobar, "Script results returned (GET, no callback)" );
+ equals( status, "success", "Script results returned (GET, no callback)" );
+ start();
+ }
+ });
+});
+
test("$.getJSON(String, Hash, Function) - JSON array", function() {
expect(4);
stop();