strict check for videoID length

This commit is contained in:
Michael C
2021-11-19 02:13:11 -05:00
parent 20e9a3e8b1
commit 0a869dbbd7
2 changed files with 17 additions and 1 deletions

View File

@@ -1084,4 +1084,20 @@ describe("postSkipSegments", () => {
})
.catch(err => done(err));
});
it("Should return 400 if videoID is empty", (done) => {
const videoID = null as string;
postSkipSegmentParam({
videoID,
startTime: 1,
endTime: 5,
category: "sponsor",
userID: submitUserTwo
})
.then(res => {
assert.strictEqual(res.status, 400);
done();
})
.catch(err => done(err));
});
});