Fixup tests after removing provisioning routes

This commit is contained in:
Johannes Zellner
2015-08-26 11:03:17 -07:00
parent 23a5a275f8
commit f0fd4ea45c
2 changed files with 2 additions and 99 deletions

View File

@@ -53,7 +53,8 @@ function checkData(data) {
function update(req, res, next) {
assert.strictEqual(typeof req.body, 'object');
if (typeof req.body.sourceTarballUrl !== 'string') return next(new HttpError(400, 'No sourceTarballUrl provided'));
if (!req.body.sourceTarballUrl || typeof req.body.sourceTarballUrl !== 'string') return next(new HttpError(400, 'No sourceTarballUrl provided'));
if (!req.body.data || typeof req.body.data !== 'object') return next(new HttpError(400, 'No data provided'));
debug('provision: received from box %j', req.body);