Merge pull request #476 from mchangrh/fullvideo-revive-nonvip

add tests for #454
This commit is contained in:
Ajay Ramachandran 2022-07-12 23:14:03 -04:00 committed by GitHub
commit 972cb96259
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -654,4 +654,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));
});
});