From 589a5043e34c3bb98eb97b780fd015e0d1296152 Mon Sep 17 00:00:00 2001 From: Filipe David Borba Manana Date: Tue, 17 May 2011 19:18:57 +0000 Subject: Added extra assertions to the test for COUCHDB-885 This is to verify the attachments really exist in the target and have the right data and metadata. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1104478 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/replication.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'share/www') diff --git a/share/www/script/test/replication.js b/share/www/script/test/replication.js index bde4ad11..ea6713e8 100644 --- a/share/www/script/test/replication.js +++ b/share/www/script/test/replication.js @@ -838,6 +838,12 @@ couchTests.replication = function(debug) { T(copy !== null); TEquals("undefined", typeof copy._conflicts); TEquals("undefined", typeof copy._deleted_conflicts); + TEquals("text/plain", copy._attachments["hello.txt"]["content_type"]); + TEquals("aGVsbG8gd29ybGQ=", copy._attachments["hello.txt"]["data"]); + TEquals("gzip", copy._attachments["hello.txt"]["encoding"]); + TEquals("not/compressible", copy._attachments["foo.dat"]["content_type"]); + TEquals("aSBhbSBub3QgZ3ppcGVk", copy._attachments["foo.dat"]["data"]); + TEquals("undefined", typeof copy._attachments["foo.dat"]["encoding"]); // end of test for COUCHDB-885 -- cgit v1.2.3