Skip to content

Commit 7ed2a00

Browse files
author
alxndrsn
committed
add default handling to assume
1 parent 65f4a24 commit 7ed2a00

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/integration/test.attachments.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2076,7 +2076,13 @@ adapters.forEach(function (adapter) {
20762076
// done();
20772077
// });
20782078
} else {
2079-
done(new Error(`No handling for server type: '${serverType}'`));
2079+
// TODO revert to throwing for unknown. for now, we gotta assume something to get meaningful errors
2080+
err.status.should.equal(404);
2081+
err.json().then(body => {
2082+
body.reason.should.equal('missing');
2083+
done();
2084+
}).catch(done);
2085+
//done(new Error(`No handling for server type: '${serverType}'`));
20802086
}
20812087
});
20822088
} else {
@@ -2120,6 +2126,7 @@ adapters.forEach(function (adapter) {
21202126
if (serverType === 'couchdb') {
21212127
should.not.exist(doc._attachments);
21222128
} else {
2129+
// TODO revert to throwing for unknown serverType
21232130
doc._attachments['foo.txt'].content_type.should.equal('text/plain');
21242131
doc._attachments['foo.txt'].data.should.equal('VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ=');
21252132
}

0 commit comments

Comments
 (0)