mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 11:36:58 +03:00
add tests for #454
This commit is contained in:
@@ -628,4 +628,17 @@ describe("voteOnSponsorTime", () => {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it("Should not be able to revive full video segment as non-vip", (done) => {
|
||||
const UUID = "full-video-uuid-1";
|
||||
postVote("VIPUser", UUID, 0); // downvote as VIP
|
||||
postVote("randomID3", UUID, 1)
|
||||
.then(async res => {
|
||||
assert.strictEqual(res.status, 200);
|
||||
const row = await getSegmentVotes(UUID);
|
||||
assert.strictEqual(row.votes, -2);
|
||||
done();
|
||||
})
|
||||
.catch(err => done(err));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user