summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2012-11-21 13:00:31 +0000
committerRobert Newson <rnewson@apache.org>2012-11-21 15:13:30 +0000
commit7541d4fa0831b772b37ba1807e7df890307ea825 (patch)
tree43c5243aa1f99276ec531c591bada27cc79a11f6
parent15e2ef55736376ba01c20253bb9bcab25d5f8ea1 (diff)
downloadcouchdb-7541d4fa0831b772b37ba1807e7df890307ea825.tar.gz
test for 1608
-rw-r--r--share/www/script/test/update_documents.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/share/www/script/test/update_documents.js b/share/www/script/test/update_documents.js
index bbaa07da7..6a318fd5c 100644
--- a/share/www/script/test/update_documents.js
+++ b/share/www/script/test/update_documents.js
@@ -87,6 +87,10 @@ couchTests.update_documents = function(debug) {
resp = {"code": 302}
return [null, resp];
}),
+ "resp-code-and-json" : stringFun(function(doc,req) {
+ resp = {"code": 302, "json": {"ok": true}}
+ return [{"_id": req["uuid"]}, resp];
+ }),
"binary" : stringFun(function(doc, req) {
var resp = {
"headers" : {
@@ -216,6 +220,10 @@ couchTests.update_documents = function(debug) {
xhr = CouchDB.request("POST", "/test_suite_db/_design/update/_update/resp-code/");
T(xhr.status == 302);
+ xhr = CouchDB.request("POST", "/test_suite_db/_design/update/_update/resp-code-and-json/");
+ TEquals(302, xhr.status);
+ T(JSON.parse(xhr.responseText).ok);
+
// base64 response
xhr = CouchDB.request("PUT", "/test_suite_db/_design/update/_update/binary/"+docid, {
headers : {"X-Couch-Full-Commit":"false"},