Skip to content

Commit fbeebc1

Browse files
committed
add lockCategories tests, getUserInfo
1 parent 9c2258f commit fbeebc1

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

test/cases/lockCategoriesRecords.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,4 +460,43 @@ describe("lockCategoriesRecords", () => {
460460
})
461461
.catch(err => done(err));
462462
});
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+
});
463502
});

0 commit comments

Comments
 (0)