summaryrefslogtreecommitdiff
path: root/share/www/script/test/copy_doc.js
diff options
context:
space:
mode:
Diffstat (limited to 'share/www/script/test/copy_doc.js')
-rw-r--r--share/www/script/test/copy_doc.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/share/www/script/test/copy_doc.js b/share/www/script/test/copy_doc.js
index a6de1892..a15e3ef8 100644
--- a/share/www/script/test/copy_doc.js
+++ b/share/www/script/test/copy_doc.js
@@ -23,6 +23,7 @@ couchTests.copy_doc = function(debug) {
});
T(xhr.status == 201);
+ T(JSON.parse(xhr.responseText).ok);
T(db.open("doc_that_was_copied").v == 1);
// COPY with existing target
@@ -36,6 +37,10 @@ couchTests.copy_doc = function(debug) {
});
T(xhr.status == 409); // conflict
+ // missing Destination header
+ var xhr = CouchDB.request("COPY", "/test_suite_db/doc_to_be_copied2");
+ T(xhr.status == 400); // bad request
+
var rev = db.open("doc_to_be_overwritten")._rev;
var xhr = CouchDB.request("COPY", "/test_suite_db/doc_to_be_copied2", {
headers: {"Destination":"doc_to_be_overwritten?rev=" + rev}