bones-document
Advanced tools
Comparing version 1.0.2 to 1.2.0
{ | ||
"name": "bones-document", | ||
"version": "1.0.2", | ||
"version": "1.2.0", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -0,1 +1,2 @@ | ||
process.env.NODE_ENV = 'test'; | ||
var assert = require('assert'); | ||
@@ -40,3 +41,3 @@ var spawn = require('child_process').spawn; | ||
}, { | ||
body: '{"error":"Template: Instance is not one of the possible values"}', | ||
body: 'Template: Instance is not one of the possible values', | ||
status: 409 | ||
@@ -49,2 +50,20 @@ }, function() { | ||
assert.response(main.server, { | ||
url: '/api/Page', | ||
method: 'POST', | ||
headers: { | ||
'accept': 'application/json', | ||
'content-type': 'application/json', | ||
'cookie': 'bones.token=1f4a1137268b8e384e50d0fb72c627c4' | ||
}, | ||
body: JSON.stringify(data02) | ||
}, { | ||
body: '{"message":"Template: Instance is not one of the possible values"}', | ||
status: 409 | ||
}, function() { | ||
assert['throws'](function() { | ||
fs.statSync(__dirname + '/fixture/pages/api.Page.data02.json', 'utf8'); | ||
}, "ENOENT, No such file or directory"); | ||
}); | ||
// PUT to non-existant file. | ||
@@ -74,3 +93,6 @@ var data03 = { "bones.token": "1f4a1137268b8e384e50d0fb72c627c4", id: "data03", key: "value" }; | ||
method: 'PUT', | ||
headers: { 'content-type': 'application/json' }, | ||
headers: { | ||
'content-type': 'application/json', | ||
'cookie': 'bones.token=1f4a1137268b8e384e50d0fb72c627c4' | ||
}, | ||
body: JSON.stringify(data04) | ||
@@ -86,3 +108,3 @@ }, { | ||
assert.response(main.server, { | ||
url: '/api/Page', | ||
url: '/api/Page/data04', | ||
method: 'DELETE', | ||
@@ -89,0 +111,0 @@ headers: { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
22077
125
3