From 08667f36c89965b49ee3c2f25896aa2466fad229 Mon Sep 17 00:00:00 2001 From: Filipe David Borba Manana Date: Wed, 18 Aug 2010 10:00:11 +0000 Subject: 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 --- share/www/script/test/replicator_db.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'share/www') 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); -- cgit v1.2.3