From 3487330d308166afb542cbacae0475693c0b059e Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Tue, 9 Jun 2020 16:07:10 +0200 Subject: preserve original variable names server-side --- server/tests/api/check-params/users.ts | 2 +- server/tests/api/check-params/video-blacklist.ts | 4 ++-- server/tests/api/users/users.ts | 4 ++-- server/tests/api/videos/video-blacklist.ts | 20 ++++++++++---------- 4 files changed, 15 insertions(+), 15 deletions(-) (limited to 'server/tests/api') diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts index 94d47408a..472fbda43 100644 --- a/server/tests/api/check-params/users.ts +++ b/server/tests/api/check-params/users.ts @@ -188,7 +188,7 @@ describe('Test users API validators', function () { videoQuota: -1, videoQuotaDaily: -1, role: UserRole.USER, - adminFlags: UserAdminFlag.BYPASS_VIDEO_AUTO_BLOCK + adminFlags: UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST } it('Should fail with a too small username', async function () { diff --git a/server/tests/api/check-params/video-blacklist.ts b/server/tests/api/check-params/video-blacklist.ts index b96c26989..145f43980 100644 --- a/server/tests/api/check-params/video-blacklist.ts +++ b/server/tests/api/check-params/video-blacklist.ts @@ -24,7 +24,7 @@ import { checkBadSortPagination, checkBadStartPagination } from '../../../../shared/extra-utils/requests/check-api-params' -import { VideoBlockType, VideoDetails } from '../../../../shared/models/videos' +import { VideoBlacklistType, VideoDetails } from '../../../../shared/models/videos' import { expect } from 'chai' describe('Test video blacklist API validators', function () { @@ -243,7 +243,7 @@ describe('Test video blacklist API validators', function () { }) it('Should succeed with the correct parameters', async function () { - await getBlacklistedVideosList({ url: servers[0].url, token: servers[0].accessToken, type: VideoBlockType.MANUAL }) + await getBlacklistedVideosList({ url: servers[0].url, token: servers[0].accessToken, type: VideoBlacklistType.MANUAL }) }) }) diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index af5a5fd25..cad954fcb 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts @@ -265,7 +265,7 @@ describe('Test users', function () { username: user.username, password: user.password, videoQuota: 2 * 1024 * 1024, - adminFlags: UserAdminFlag.BYPASS_VIDEO_AUTO_BLOCK + adminFlags: UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST }) }) @@ -292,7 +292,7 @@ describe('Test users', function () { } expect(userMe.adminFlags).to.be.undefined - expect(userGet.adminFlags).to.equal(UserAdminFlag.BYPASS_VIDEO_AUTO_BLOCK) + expect(userGet.adminFlags).to.equal(UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST) expect(userMe.specialPlaylists).to.have.lengthOf(1) expect(userMe.specialPlaylists[0].type).to.equal(VideoPlaylistType.WATCH_LATER) diff --git a/server/tests/api/videos/video-blacklist.ts b/server/tests/api/videos/video-blacklist.ts index 6e15893f3..a8500627b 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 { VideoBlocklist, VideoBlockType } from '../../../../shared/models/videos' +import { VideoBlacklist, VideoBlacklistType } 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: VideoBlockType.MANUAL + type: VideoBlacklistType.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: VideoBlockType.AUTO_BEFORE_PUBLISHED + type: VideoBlacklistType.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: VideoBlocklist + let videoToRemove: VideoBlacklist 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: VideoBlocklist[] = res.body.data + const blacklistedVideos: VideoBlacklist[] = 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.BYPASS_VIDEO_AUTO_BLOCK, + adminFlags: UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST, 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: VideoBlockType.AUTO_BEFORE_PUBLISHED + type: VideoBlacklistType.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: VideoBlockType.AUTO_BEFORE_PUBLISHED + type: VideoBlacklistType.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: VideoBlockType.AUTO_BEFORE_PUBLISHED + type: VideoBlacklistType.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: VideoBlockType.AUTO_BEFORE_PUBLISHED + type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED }) expect(res.body.total).to.equal(3) -- cgit v1.2.3