couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [3/8] git commit: Test the X-Couch-Id header
Date Tue, 13 Nov 2012 14:01:55 GMT
Test the X-Couch-Id header


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

Branch: refs/heads/1585-feature-per-module-log-levels
Commit: e27f3d5f2c53a8fe265a3c4fed251e39b8aa6add
Parents: d25646f
Author: Benjamin Nortier <bjnortier@gmail.com>
Authored: Fri Nov 2 12:46:20 2012 +0000
Committer: Jan Lehnardt <jan@apache.org>
Committed: Tue Nov 13 15:01:54 2012 +0100

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


http://git-wip-us.apache.org/repos/asf/couchdb/blob/e27f3d5f/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..1dc1b4e 100644
--- a/share/www/script/test/update_documents.js
+++ b/share/www/script/test/update_documents.js
@@ -107,6 +107,7 @@ couchTests.update_documents = function(debug) {
   var resp = db.save(doc);
   T(resp.ok);
   var docid = resp.id;
+  T(equals(docid, db.last_req.getResponseHeader("X-Couch-Id"))); 
 
   // update error
   var xhr = CouchDB.request("POST", "/test_suite_db/_design/update/_update/");
@@ -117,7 +118,8 @@ couchTests.update_documents = function(debug) {
   xhr = CouchDB.request("PUT", "/test_suite_db/_design/update/_update/hello/"+docid);
   T(xhr.status == 201);
   T(xhr.responseText == "<p>hello doc</p>");
-  T(/charset=utf-8/.test(xhr.getResponseHeader("Content-Type")))
+  T(/charset=utf-8/.test(xhr.getResponseHeader("Content-Type")));
+  T(equals(docid, xhr.getResponseHeader("X-Couch-Id")));
 
   doc = db.open(docid);
   T(doc.world == "hello");


Mime
View raw message