You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by fd...@apache.org on 2010/08/18 13:26:59 UTC
svn commit: r986625 - /couchdb/trunk/share/www/script/test/replicator_db.js
Author: fdmanana
Date: Wed Aug 18 11:26:58 2010
New Revision: 986625
URL: http://svn.apache.org/viewvc?rev=986625&view=rev
Log:
Add one more test to replicator_db.js: test that after a design doc is updated on source it gets replicated to the target.
Modified:
couchdb/trunk/share/www/script/test/replicator_db.js
Modified: couchdb/trunk/share/www/script/test/replicator_db.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/replicator_db.js?rev=986625&r1=986624&r2=986625&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/replicator_db.js (original)
+++ couchdb/trunk/share/www/script/test/replicator_db.js Wed Aug 18 11:26:58 2010
@@ -214,6 +214,18 @@ couchTests.replicator_db = function(debu
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);