(#247) - fix tests and make jscs happy
Project: http://git-wip-us.apache.org/repos/asf/couchdb-nano/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-nano/commit/f485c607 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-nano/tree/f485c607 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-nano/diff/f485c607 Branch: refs/heads/master Commit: f485c607100a3e48e4ac320dbd6cef4d3185854c Parents: fd0e0a8 Author: Johannes J. Schmidt <j...@die-tf.de> Authored: Thu Feb 26 14:01:36 2015 +0100 Committer: Johannes J. Schmidt <j...@die-tf.de> Committed: Thu Feb 26 14:01:36 2015 +0100 ---------------------------------------------------------------------- lib/nano.js | 1 + tests/unit/multipart/insert.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-nano/blob/f485c607/lib/nano.js ---------------------------------------------------------------------- diff --git a/lib/nano.js b/lib/nano.js index 6d4b1e9..6aeadd2 100644 --- a/lib/nano.js +++ b/lib/nano.js @@ -571,6 +571,7 @@ module.exports = exports = nano = function dbScope(cfg) { follows: true, length: Buffer.isBuffer(att.data) ? att.data.length : Buffer.byteLength(att.data), + /* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */ 'content_type': att.content_type }; multipart.push({body: att.data}); http://git-wip-us.apache.org/repos/asf/couchdb-nano/blob/f485c607/tests/unit/multipart/insert.js ---------------------------------------------------------------------- diff --git a/tests/unit/multipart/insert.js b/tests/unit/multipart/insert.js index be197bf..5eea112 100644 --- a/tests/unit/multipart/insert.js +++ b/tests/unit/multipart/insert.js @@ -16,7 +16,10 @@ insertMultipart({hey: 1}, [{ method: 'PUT', multipart: [ { - body: '{"_attachments":{"att":{"follows":true,"length":4}},"hey":1}', + body: + '{"_attachments":' + + '{"att":{"follows":true,"length":4,"content_type":"text/plain"}}' + + ',"hey":1}', 'content-type': 'application/json' }, {body: 'some'}