add test case

This commit is contained in:
Michael C 2021-08-27 16:44:29 -04:00
parent 268008945c
commit c448bb3d9a
No known key found for this signature in database
GPG key ID: FFB04FB3B878B7B4

View file

@ -987,4 +987,16 @@ describe("postSkipSegments", () => {
})
.catch(err => done(err));
});
it("Should be rejected if a POI is at less than 1 second", (done: Done) => {
fetch(`${getbaseURL()
}/api/skipSegments?videoID=qqwerty&startTime=0.5&endTime=0.5&userID=testtesttesttesttesttesttesttesttesting`, {
method: "POST",
})
.then(res => {
assert.strictEqual(res.status, 400);
done();
})
.catch(err => done(err));
});
});