reverted test to 404

This commit is contained in:
Joe Dowd 2020-10-06 23:25:16 +01:00
parent 62916f6a7e
commit b244b1e1ad

View file

@ -40,16 +40,15 @@ describe('getSegmentsByHash', () => {
});
});
it('Should be able to get an emptry array if no videos', (done) => {
it('Should be able to get an empty array if no videos', (done) => {
request.get(utils.getbaseURL()
+ '/api/skipSegments/11111?categories=["shilling"]', null,
(err, res, body) => {
if (err) done("Couldn't call endpoint");
else if (res.statusCode !== 200) done("non 200 status code, was " + res.statusCode);
else if (res.statusCode !== 404) done("non 404 status code, was " + res.statusCode);
else {
if (JSON.parse(body).length === 0) done(); // pass
if (JSON.parse(body).length === 0 && body === '[]') done(); // pass
else done("non empty array returned");
}
});
});