couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [47/50] [abbrv] git commit: test for 1608
Date Thu, 06 Dec 2012 11:34:43 GMT
test for 1608


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/98b2ad69
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/98b2ad69
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/98b2ad69

Branch: refs/heads/1536-feature-add-docs
Commit: 98b2ad697694fdf6be293bed3ea31a8d1e39b0ad
Parents: bf15d2b
Author: Robert Newson <rnewson@apache.org>
Authored: Wed Nov 21 13:00:31 2012 +0000
Committer: Robert Newson <rnewson@apache.org>
Committed: Wed Nov 21 13:45:26 2012 +0000

----------------------------------------------------------------------
 share/www/script/test/update_documents.js |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/98b2ad69/share/www/script/test/update_documents.js
----------------------------------------------------------------------
diff --git a/share/www/script/test/update_documents.js b/share/www/script/test/update_documents.js
index bbaa07d..6a318fd 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"},


Mime
View raw message