File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -460,4 +460,43 @@ describe("lockCategoriesRecords", () => {
460
460
} )
461
461
. catch ( err => done ( err ) ) ;
462
462
} ) ;
463
+
464
+ it ( "should be able to add poi type category by type skip" , ( done ) => {
465
+ const videoID = "add-record-poi" ;
466
+ client . post ( endpoint , {
467
+ videoID,
468
+ userID : lockVIPUser ,
469
+ categories : [ "poi_highlight" ] ,
470
+ actionTypes : [ "skip" ]
471
+ } )
472
+ . then ( res => {
473
+ assert . strictEqual ( res . status , 200 ) ;
474
+ checkLockCategories ( videoID )
475
+ . then ( result => {
476
+ assert . strictEqual ( result . length , 1 ) ;
477
+ assert . strictEqual ( result [ 0 ] , "poi_highlight" ) ;
478
+ } ) ;
479
+ done ( ) ;
480
+ } )
481
+ . catch ( err => done ( err ) ) ;
482
+ } ) ;
483
+
484
+ it ( "Should not add lock of invalid type" , ( done ) => {
485
+ const videoID = "add_invalid_type" ;
486
+ client . post ( endpoint , {
487
+ videoID,
488
+ userID : lockVIPUser ,
489
+ categories : [ "future_unused_invalid_type" ] ,
490
+ actionTypes : [ "skip" ]
491
+ } )
492
+ . then ( res => {
493
+ assert . strictEqual ( res . status , 200 ) ;
494
+ checkLockCategories ( videoID )
495
+ . then ( result => {
496
+ assert . strictEqual ( result . length , 0 ) ;
497
+ } ) ;
498
+ done ( ) ;
499
+ } )
500
+ . catch ( err => done ( err ) ) ;
501
+ } ) ;
463
502
} ) ;
You can’t perform that action at this time.
0 commit comments