disallow vote types 10/11

This commit is contained in:
Michael C
2021-07-02 23:07:17 -04:00
parent f1d22c6ca4
commit 931b3fdc68
2 changed files with 29 additions and 4 deletions

View File

@@ -518,4 +518,22 @@ describe('voteOnSponsorTime', () => {
.catch(err => done(err));
});
it('Should not be able to vote with type 10', (done: Done) => {
fetch(getbaseURL() + "/api/voteOnSponsorTime?userID=VIPUser&UUID=segment-locking-uuid-1&type=10")
.then(res => {
if (res.status !== 400) done('non 400 (' + res.status + ')');
else done(); // pass
})
.catch(err => done('couldn\'t call endpoint'));
});
it('Should not be able to vote with type 11', (done: Done) => {
fetch(getbaseURL() + "/api/voteOnSponsorTime?userID=VIPUser&UUID=segment-locking-uuid-1&type=11")
.then(res => {
if (res.status !== 400) done('non 400 (' + res.status + ')');
else done(); // pass
})
.catch(err => done('couldn\'t call endpoint'));
});
});