Skip to content

Commit 9c72e20

Browse files
committed
test for changing chapter category
1 parent ec41102 commit 9c72e20

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/cases/voteOnSponsorTime.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,18 @@ describe("voteOnSponsorTime", () => {
293293
.catch(err => done(err));
294294
});
295295

296+
it("Should not able to change to chapter category", (done) => {
297+
const UUID = "incorrect-category";
298+
postVoteCategory(randomID2, UUID, "chapter")
299+
.then(async res => {
300+
assert.strictEqual(res.status, 400);
301+
const row = await getSegmentCategory(UUID);
302+
assert.strictEqual(row.category, "sponsor");
303+
done();
304+
})
305+
.catch(err => done(err));
306+
});
307+
296308
it("Should be able to change your vote for a category and it should add your vote to the database(segment unlocked, nextCatgeory unlocked)", (done) => {
297309
const UUID = "vote-uuid-4";
298310
postVoteCategory(randomID2, UUID, "outro")

0 commit comments

Comments
 (0)