Skip to content

Commit 0339ba6

Browse files
committed
fix tempVIP tests
1 parent 654846e commit 0339ba6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

test/cases/tempVip.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ describe("tempVIP test", function() {
9191
})
9292
);
9393
it("Should be able to normal upvote as a user", () =>
94-
postVote(tempVIP1.pubID, targetChannelUUID, 1)
94+
postVote(tempVIP1.privID, targetChannelUUID, 1)
9595
.then(async res => {
9696
assert.strictEqual(res.status, 200);
9797
const row = await getSegment(targetChannelUUID);
@@ -200,18 +200,16 @@ describe("tempVIP test", function() {
200200
// error 40X testing
201201
it("Should return 404 with invalid videoID", () => {
202202
const testUser = genAnonUser();
203-
const badVideoID = genRandomValue("videoID", "badVideoID");
204-
return addTempVIP("true", permVIP1.privID, testUser.pubID, badVideoID)
203+
return addTempVIP("true", permVIP1.privID, testUser.pubID, "knownWrongID")
205204
.then(async res => {
206205
assert.strictEqual(res.status, 404);
207206
const vip = await checkUserVIP(testUser.pubID);
208207
assert.ok(!vip, "Should be no listed channelID");
209208
});
210209
});
211210
it("Should return 400 with invalid userID", () => {
212-
const testUser = genAnonUser();
213-
const badVideoID = genRandomValue("videoID", "badVideoID");
214-
return addTempVIP("true", permVIP1.privID, testUser.pubID, badVideoID)
211+
const videoID = genRandomValue("videoID", "badVideoID");
212+
return addTempVIP("true", permVIP1.privID, "" as HashedUserID, videoID)
215213
.then(res => assert.strictEqual(res.status, 400));
216214
});
217215
it("Should return 400 with invalid adminUserID", () =>

0 commit comments

Comments
 (0)