additional tests

This commit is contained in:
Michael C 2021-07-07 17:37:40 -04:00
parent 5e58efb07f
commit 9088d9fb9e
No known key found for this signature in database
GPG key ID: FFB04FB3B878B7B4

View file

@ -173,4 +173,22 @@ describe('getLockCategoriesByHash', () => {
}) })
.catch(() => ("couldn't call endpoint")); .catch(() => ("couldn't call endpoint"));
}); });
it('should return 400 if hash too short', (done: Done) => {
fetch(getbaseURL() + '/api/lockCategories/00')
.then(res => {
assert.strictEqual(res.status, 400);
done();
})
.catch(err => done(err));
});
it('should return 400 if no hash specified', (done: Done) => {
fetch(getbaseURL() + '/api/lockCategories/')
.then(res => {
assert.strictEqual(res.status, 400);
done();
})
.catch(err => done(err));
});
}); });