Merge branch 'master' of github.com:mchangrh/SponsorBlockServer into poi-restriction

This commit is contained in:
Michael C
2021-08-28 01:39:52 -04:00
4 changed files with 94 additions and 11 deletions

View File

@@ -999,4 +999,26 @@ describe("postSkipSegments", () => {
})
.catch(err => done(err));
});
it("Should not be able to submit with colons in timestamps", (done: Done) => {
fetch(`${getbaseURL()}/api/postVideoSponsorTimes`, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
userID: "testtesttesttesttesttesttesttesttest",
videoID: "colon-1",
segments: [{
segment: ["0:2.000", "3:10.392"],
category: "sponsor",
}]
}),
})
.then(res => {
assert.strictEqual(res.status, 400);
done();
})
.catch(err => done(err));
});
});