X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-blacklist.ts;h=6e15893f3ac59eba04c64db2f48f7727c90591f9;hb=5baee5fca418487e72ddcd6419d31bca8659b668;hp=67bc0114c93815bffc39ca177953f1ef4b2b8b30;hpb=d840487fed32b4604b02030c0d7464afa925904f;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/video-blacklist.ts b/server/tests/api/videos/video-blacklist.ts index 67bc0114c..6e15893f3 100644 --- a/server/tests/api/videos/video-blacklist.ts +++ b/server/tests/api/videos/video-blacklist.ts @@ -25,7 +25,7 @@ import { } from '../../../../shared/extra-utils/index' import { doubleFollow } from '../../../../shared/extra-utils/server/follows' import { waitJobs } from '../../../../shared/extra-utils/server/jobs' -import { VideoBlacklist, VideoBlacklistType } from '../../../../shared/models/videos' +import { VideoBlocklist, VideoBlockType } from '../../../../shared/models/videos' import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model' import { User, UserRole } from '../../../../shared/models/users' import { getMagnetURI, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports' @@ -127,7 +127,7 @@ describe('Test video blacklist', function () { const res = await getBlacklistedVideosList({ url: servers[0].url, token: servers[0].accessToken, - type: VideoBlacklistType.MANUAL + type: VideoBlockType.MANUAL }) expect(res.body.total).to.equal(2) @@ -141,7 +141,7 @@ describe('Test video blacklist', function () { const res = await getBlacklistedVideosList({ url: servers[0].url, token: servers[0].accessToken, - type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED + type: VideoBlockType.AUTO_BEFORE_PUBLISHED }) expect(res.body.total).to.equal(0) @@ -219,7 +219,7 @@ describe('Test video blacklist', function () { }) describe('When removing a blacklisted video', function () { - let videoToRemove: VideoBlacklist + let videoToRemove: VideoBlocklist let blacklist = [] it('Should not have any video in videos list on server 1', async function () { @@ -328,7 +328,7 @@ describe('Test video blacklist', function () { it('Should have the correct video blacklist unfederate attribute', async function () { const res = await getBlacklistedVideosList({ url: servers[0].url, token: servers[0].accessToken, sort: 'createdAt' }) - const blacklistedVideos: VideoBlacklist[] = res.body.data + const blacklistedVideos: VideoBlocklist[] = res.body.data const video3Blacklisted = blacklistedVideos.find(b => b.video.uuid === video3UUID) const video4Blacklisted = blacklistedVideos.find(b => b.video.uuid === video4UUID) @@ -396,7 +396,7 @@ describe('Test video blacklist', function () { url: servers[0].url, accessToken: servers[0].accessToken, username: user.username, - adminFlags: UserAdminFlag.BY_PASS_VIDEO_AUTO_BLACKLIST, + adminFlags: UserAdminFlag.BYPASS_VIDEO_AUTO_BLOCK, password: user.password, role: UserRole.USER }) @@ -413,7 +413,7 @@ describe('Test video blacklist', function () { const res = await getBlacklistedVideosList({ url: servers[0].url, token: servers[0].accessToken, - type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED + type: VideoBlockType.AUTO_BEFORE_PUBLISHED }) expect(res.body.total).to.equal(1) @@ -434,7 +434,7 @@ describe('Test video blacklist', function () { url: servers[0].url, token: servers[0].accessToken, sort: 'createdAt', - type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED + type: VideoBlockType.AUTO_BEFORE_PUBLISHED }) expect(res.body.total).to.equal(2) @@ -453,7 +453,7 @@ describe('Test video blacklist', function () { url: servers[0].url, token: servers[0].accessToken, sort: 'createdAt', - type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED + type: VideoBlockType.AUTO_BEFORE_PUBLISHED }) expect(res.body.total).to.equal(3) @@ -466,7 +466,7 @@ describe('Test video blacklist', function () { const res = await getBlacklistedVideosList({ url: servers[0].url, token: servers[0].accessToken, - type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED + type: VideoBlockType.AUTO_BEFORE_PUBLISHED }) expect(res.body.total).to.equal(3)