From 6ddcdf17ef2a5e55f0962211c7c878aa5e74ffe7 Mon Sep 17 00:00:00 2001 From: Filipe David Borba Manana Date: Wed, 18 Aug 2010 11:26:58 +0000 Subject: Add one more test to replicator_db.js: test that after a design doc is updated on source it gets replicated to the target. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@986625 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/replicator_db.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/share/www/script/test/replicator_db.js b/share/www/script/test/replicator_db.js index c16bb1e7..30468006 100644 --- a/share/www/script/test/replicator_db.js +++ b/share/www/script/test/replicator_db.js @@ -214,6 +214,18 @@ couchTests.replicator_db = function(debug) { waitForSeq(dbA, dbB); var ddoc_copy = dbB.open("_design/foobar"); T(ddoc_copy !== null); + T(ddoc.language === "javascript"); + + // update the design doc on source, test that the new revision is replicated + ddoc.language = "erlang"; + T(dbA.save(ddoc).ok); + T(ddoc._rev.indexOf("2-") === 0); + + waitForSeq(dbA, dbB); + ddoc_copy = dbB.open("_design/foobar"); + T(ddoc_copy !== null); + T(ddoc_copy._rev === ddoc._rev); + T(ddoc.language === "erlang"); // stop replication by deleting the replication document T(repDb.deleteDoc(repDoc1).ok); -- cgit v1.2.3