Merge branch 'master' into unhide-vote

This commit is contained in:
Ajay Ramachandran
2021-07-03 22:37:23 -04:00
committed by GitHub
9 changed files with 178 additions and 86 deletions

View File

@@ -553,4 +553,23 @@ 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'));
});
});