couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject couchdb commit: updated refs/heads/master to 664b9e0
Date Thu, 17 Dec 2015 11:07:43 GMT
Repository: couchdb
Updated Branches:
  refs/heads/master e8e03b68b -> 664b9e0a9


JS test: in _temp_view fix, delete temp ddocs


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

Branch: refs/heads/master
Commit: 664b9e0a929074baaf550429b00ea224d74cadaf
Parents: e8e03b6
Author: Jan Lehnardt <jan@apache.org>
Authored: Thu Dec 17 12:07:37 2015 +0100
Committer: Jan Lehnardt <jan@apache.org>
Committed: Thu Dec 17 12:07:37 2015 +0100

----------------------------------------------------------------------
 test/javascript/couch.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/664b9e0a/test/javascript/couch.js
----------------------------------------------------------------------
diff --git a/test/javascript/couch.js b/test/javascript/couch.js
index 53f8c97..1a2f950 100644
--- a/test/javascript/couch.js
+++ b/test/javascript/couch.js
@@ -169,10 +169,14 @@ function CouchDB(name, httpHeaders, globalRequestOptions) {
       body: JSON.stringify(ddoc)
     });
     CouchDB.maybeThrowError(this.last_req);
+    var ddoc_result = JSON.parse(this.last_req.responseText)
     this.last_req = this.request("GET", this.uri + ddoc_name + "/_view/view"
       + encodeOptions(options));
     CouchDB.maybeThrowError(this.last_req);
-    return JSON.parse(this.last_req.responseText);
+    var query_result = JSON.parse(this.last_req.responseText);
+    var res = this.request("DELETE", this.uri + ddoc_name + '?rev=' + ddoc_result.rev);
+
+    return query_result;
   };
 
   this.view = function(viewname, options, keys) {


Mime
View raw message