split postSkipSegments into stubbed 400

This commit is contained in:
Michael C
2023-02-21 20:09:13 -05:00
parent 900fa9f64e
commit f4537160de
2 changed files with 48 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ describe("postSkipSegments 400 - missing params", () => {
})
.catch(err => done(err));
});
it("Should return 400 for missing params (JSON method) 2", (done) => {
postSkipSegmentJSON({
userID,
@@ -33,6 +34,7 @@ describe("postSkipSegments 400 - missing params", () => {
})
.catch(err => done(err));
});
it("Should return 400 for missing params (JSON method) 3", (done) => {
postSkipSegmentJSON({
userID,
@@ -110,6 +112,20 @@ describe("postSkipSegments 400 - missing params", () => {
})
.catch(err => done(err));
});
it("Should return 400 if no segments provided", (done) => {
postSkipSegmentJSON({
videoID,
segments: [],
category: "sponsor",
userID
})
.then(res => {
assert.strictEqual(res.status, 400);
done();
})
.catch(err => done(err));
});
});
describe("postSkipSegments 400 - Chapters", () => {