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 <[email protected]> Authored: Thu Dec 17 12:07:37 2015 +0100 Committer: Jan Lehnardt <[email protected]> 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) {
