aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2012-08-23 21:30:45 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-08-23 21:33:29 -0400
commitc01e022f33575ed45fb8da65be756fc464d40a24 (patch)
tree6b269724eddced618aa759655cfed38281eb15dd /test
parenta9c2a9bf61af4c09e8f089b45e8986b9a5416d46 (diff)
downloadjquery-c01e022f33575ed45fb8da65be756fc464d40a24.tar.gz
jquery-c01e022f33575ed45fb8da65be756fc464d40a24.zip
Fix #11586. Ajax DELETE ain't got no body, so data goes to its URL.
Diffstat (limited to 'test')
-rw-r--r--test/unit/ajax.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js
index 1345eae3a..2483a4bbd 100644
--- a/test/unit/ajax.js
+++ b/test/unit/ajax.js
@@ -840,6 +840,21 @@ test("jQuery.ajax - HEAD requests", function() {
});
+
+test("jQuery.ajax - DELETE requests", function() {
+ expect(1);
+
+ jQuery.ajax({
+ url: "devo.html",
+ type: "DELETE",
+ data: { "whip": "it", "qty": "good" },
+ beforeSend: function( _ , s ) {
+ equal( s.url, "devo.html?whip=it&qty=good", "Delete requests encode data in URL" );
+ return false;
+ }
+ });
+});
+
test("jQuery.ajax - beforeSend", function() {
expect(1);
stop();