Comparing version 5.12.0 to 5.12.2
@@ -1015,3 +1015,3 @@ /* minimal couch in node | ||
follows: true, | ||
length: Buffer.byteLength(att.data), | ||
length: Buffer.isBuffer(att.data) ? att.data.length : Buffer.byteLength(att.data), | ||
content_type: att.content_type | ||
@@ -1018,0 +1018,0 @@ }; |
@@ -7,3 +7,3 @@ { | ||
"repository": "git://github.com/dscape/nano", | ||
"version": "5.12.0", | ||
"version": "5.12.2", | ||
"author": "Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com)", | ||
@@ -10,0 +10,0 @@ "contributors": [ |
@@ -39,2 +39,8 @@ [ | ||
} | ||
, { "method" : "put" | ||
, "path" : "/multipart_insert/otherdoc" | ||
, "body" : "*" | ||
, "status" : 201 | ||
, "response" : "{\"ok\": true, \"id\": \"foobar\", \"rev\": \"1-921bd51\" }" | ||
} | ||
, { "method" : "delete" | ||
@@ -41,0 +47,0 @@ , "path" : "/multipart_insert" |
@@ -63,2 +63,15 @@ var specify = require('specify') | ||
specify("multipart_insert:test_with_attachment_via_buffer", timeout, function (assert) { | ||
var att = { | ||
name: 'att', | ||
data: new Buffer('foo'), | ||
content_type: 'text/plain' | ||
}; | ||
db.multipart.insert({"foo": "bar"}, [att], "otherdoc", function (error, foo) { | ||
assert.equal(error, undefined, "Should have stored foo and attachment"); | ||
assert.equal(foo.ok, true, "Response should be ok"); | ||
assert.ok(foo.rev, "Response should have rev"); | ||
}); | ||
}); | ||
specify("multipart_insert:teardown", timeout, function (assert) { | ||
@@ -65,0 +78,0 @@ nano.db.destroy("multipart_insert", function (err) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
195724
94
4574
1