Skip to content

Commit

Permalink
use server type in second test
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed Mar 27, 2024
1 parent 794873c commit 73ff41d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tests/integration/test.attachments.js
Original file line number Diff line number Diff line change
Expand Up @@ -2116,11 +2116,14 @@ adapters.forEach(function (adapter) {
console.log('data checked.');
done();
} else if (adapter === 'http') {
// does not exist on couchdb, but does on pouchdb-server
if (doc._attachments) {
doc._attachments['foo.txt'].content_type.should.equal('text/plain');
doc._attachments['foo.txt'].data.should.equal('VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ=');
}
testUtils.getServerType(serverType => {
if (serverType === 'couchdb') {
should.not.exist(doc._attachments);
} else {
doc._attachments['foo.txt'].content_type.should.equal('text/plain');
doc._attachments['foo.txt'].data.should.equal('VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ=');
}
});
done();
} else {
throw new Error(`No handling for adapter: '${adapter}'`);
Expand Down

0 comments on commit 73ff41d

Please sign in to comment.