@@ -91,7 +91,7 @@ describe("tempVIP test", function() {
91
91
} )
92
92
) ;
93
93
it ( "Should be able to normal upvote as a user" , ( ) =>
94
- postVote ( tempVIP1 . pubID , targetChannelUUID , 1 )
94
+ postVote ( tempVIP1 . privID , targetChannelUUID , 1 )
95
95
. then ( async res => {
96
96
assert . strictEqual ( res . status , 200 ) ;
97
97
const row = await getSegment ( targetChannelUUID ) ;
@@ -200,18 +200,16 @@ describe("tempVIP test", function() {
200
200
// error 40X testing
201
201
it ( "Should return 404 with invalid videoID" , ( ) => {
202
202
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" )
205
204
. then ( async res => {
206
205
assert . strictEqual ( res . status , 404 ) ;
207
206
const vip = await checkUserVIP ( testUser . pubID ) ;
208
207
assert . ok ( ! vip , "Should be no listed channelID" ) ;
209
208
} ) ;
210
209
} ) ;
211
210
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 )
215
213
. then ( res => assert . strictEqual ( res . status , 400 ) ) ;
216
214
} ) ;
217
215
it ( "Should return 400 with invalid adminUserID" , ( ) =>
0 commit comments