summaryrefslogtreecommitdiff
path: root/share/www
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2010-08-18 10:00:11 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2010-08-18 10:00:11 +0000
commit08667f36c89965b49ee3c2f25896aa2466fad229 (patch)
treec4bb1ea785a823a025216102e0fd60d2b630385b /share/www
parent086eec7b899f566d72fcf0b3effc070e591ee37e (diff)
Test that design docs get replicated in a continuous replication when the replication is triggered by a replication doc.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@986614 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www')
-rw-r--r--share/www/script/test/replicator_db.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/share/www/script/test/replicator_db.js b/share/www/script/test/replicator_db.js
index edeb1cc5..c16bb1e7 100644
--- a/share/www/script/test/replicator_db.js
+++ b/share/www/script/test/replicator_db.js
@@ -200,6 +200,21 @@ couchTests.replicator_db = function(debug) {
T(repDoc1.state === "triggered");
T(typeof repDoc1.replication_id === "string");
+ // add a design doc to source, it will be replicated to target
+ // when the "user_ctx" property is not defined in the replication doc,
+ // the replication will be done under an _admin context, therefore
+ // design docs will be replicated
+ var ddoc = {
+ _id: "_design/foobar",
+ language: "javascript"
+ };
+
+ T(dbA.save(ddoc).ok);
+
+ waitForSeq(dbA, dbB);
+ var ddoc_copy = dbB.open("_design/foobar");
+ T(ddoc_copy !== null);
+
// stop replication by deleting the replication document
T(repDb.deleteDoc(repDoc1).ok);