summaryrefslogtreecommitdiff
path: root/share/www/script/test/replication.js
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2009-03-15 17:47:29 +0000
committerJohn Christopher Anderson <jchris@apache.org>2009-03-15 17:47:29 +0000
commit899fedf56790c3c4c213d02ce698e796dbbb6b43 (patch)
treee0c0f219ba8bbd9ca67e951c3501a60de1ff77da /share/www/script/test/replication.js
parent9885c09375a374d6cceb95f59b3fef26b6177ad3 (diff)
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
Diffstat (limited to 'share/www/script/test/replication.js')
-rw-r--r--share/www/script/test/replication.js17
1 files changed, 17 insertions, 0 deletions
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")
};
},