diff options
author | Filipe David Borba Manana <fdmanana@apache.org> | 2010-08-18 11:26:58 +0000 |
---|---|---|
committer | Filipe David Borba Manana <fdmanana@apache.org> | 2010-08-18 11:26:58 +0000 |
commit | 6ddcdf17ef2a5e55f0962211c7c878aa5e74ffe7 (patch) | |
tree | d93b2d5212feeb9e0cd81c526f240ccc71c63f5e /share/www/script | |
parent | 08667f36c89965b49ee3c2f25896aa2466fad229 (diff) |
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
Diffstat (limited to 'share/www/script')
-rw-r--r-- | share/www/script/test/replicator_db.js | 12 |
1 files changed, 12 insertions, 0 deletions
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); |