add tests for #454

This commit is contained in:
Michael C
2022-06-28 15:02:09 -04:00
parent 54db2c8c10
commit 8560c3f673

View File

@@ -628,4 +628,17 @@ describe("voteOnSponsorTime", () => {
done(); 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));
});
}); });