diff --git a/test/api/components/put.js b/test/api/components/put.js index 897facb6..6eb560fd 100644 --- a/test/api/components/put.js +++ b/test/api/components/put.js @@ -194,6 +194,8 @@ describe(endpointName, function () { // published blank data will publish @latest acceptsJsonBody(path, {name: 'valid', version: version, id: 'valid'}, {}, 200, data); + // publishing blank data without a @latest will 404 because missing resource + acceptsJsonBody(path, {name: 'valid', version: version, id: 'missing'}, {}, 404, { code: 404, message: 'Not Found' }); // block with _ref at root of object acceptsJsonBody(path, {name: 'valid', version: version, id: 'valid'}, _.assign({_ref: 'whatever'}, data), 400, {message: 'Reference (_ref) at root of object is not acceptable', code: 400}); diff --git a/test/api/pages/put.js b/test/api/pages/put.js index 394f4516..4bdb2871 100644 --- a/test/api/pages/put.js +++ b/test/api/pages/put.js @@ -135,6 +135,7 @@ describe(endpointName, function () { // published blank data will publish @latest acceptsJsonBody(path, {name: 'valid', version: version}, {}, 200, versionedPageData(version)); + acceptsJsonBody(path, {name: 'missing', version: version}, {}, 404, { code: 404, message: 'Not Found'}); // block with _ref at root of object acceptsJsonBody(path, {name: 'valid', version: version}, _.assign({_ref: 'whatever'}, pageData), 400, {message: 'Reference (_ref) at root of object is not acceptable', code: 400});