summaryrefslogtreecommitdiff
path: root/share/www/script
diff options
context:
space:
mode:
Diffstat (limited to 'share/www/script')
-rw-r--r--share/www/script/test/basics.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/share/www/script/test/basics.js b/share/www/script/test/basics.js
index ebfe5db2..7149c350 100644
--- a/share/www/script/test/basics.js
+++ b/share/www/script/test/basics.js
@@ -148,6 +148,13 @@ couchTests.basics = function(debug) {
T(locs[4] == resp.id);
T(locs[3] == "test_suite_db");
+ // document put's should return a Location header
+ var xhr = CouchDB.request("PUT", "/test_suite_db/newdoc", {
+ body: JSON.stringify({"a":1})
+ });
+ TEquals("/test_suite_db/newdoc", xhr.getResponseHeader("Location"),
+ "should return Location header to newly created document");
+
// deleting a non-existent doc should be 404
xhr = CouchDB.request("DELETE", "/test_suite_db/doc-does-not-exist");
T(xhr.status == 404);