From 899fedf56790c3c4c213d02ce698e796dbbb6b43 Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Sun, 15 Mar 2009 17:47:29 +0000 Subject: Streaming attachment replication now follows redirects and checks for error codes. Includes tests that design doc attachments are replicated. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@754704 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/replication.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'share/www/script/test/replication.js') diff --git a/share/www/script/test/replication.js b/share/www/script/test/replication.js index f069dc89..56698c59 100644 --- a/share/www/script/test/replication.js +++ b/share/www/script/test/replication.js @@ -150,6 +150,16 @@ couchTests.replication = function(debug) { } } }); + // make sure on design docs as well + dbA.save({ + _id:"_design/with_bin", + _attachments:{ + "foo.txt": { + "type":"base64", + "data": "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ=" + } + } + }); }; this.afterAB1 = function(dbA, dbB) { @@ -158,6 +168,13 @@ couchTests.replication = function(debug) { xhr = CouchDB.request("GET", "/test_suite_db_b/bin_doc/foo.txt"); T(xhr.responseText == "This is a base64 encoded text") + + // and the design-doc + xhr = CouchDB.request("GET", "/test_suite_db_a/_design/with_bin/foo.txt"); + T(xhr.responseText == "This is a base64 encoded text") + + xhr = CouchDB.request("GET", "/test_suite_db_b/_design/with_bin/foo.txt"); + T(xhr.responseText == "This is a base64 encoded text") }; }, -- cgit v1.2.3