diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-06-09 16:07:10 +0200 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2020-06-10 21:12:09 +0200 |
commit | 3487330d308166afb542cbacae0475693c0b059e (patch) | |
tree | 6a7b6ea3dd105661354bf0df6c6d3f7a7abe64e8 /server/tests/api/videos | |
parent | 5baee5fca418487e72ddcd6419d31bca8659b668 (diff) | |
download | PeerTube-3487330d308166afb542cbacae0475693c0b059e.tar.gz PeerTube-3487330d308166afb542cbacae0475693c0b059e.tar.zst PeerTube-3487330d308166afb542cbacae0475693c0b059e.zip |
preserve original variable names server-side
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r-- | server/tests/api/videos/video-blacklist.ts | 20 |
1 files changed, 10 insertions, 10 deletions
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 { | |||
25 | } from '../../../../shared/extra-utils/index' | 25 | } from '../../../../shared/extra-utils/index' |
26 | import { doubleFollow } from '../../../../shared/extra-utils/server/follows' | 26 | import { doubleFollow } from '../../../../shared/extra-utils/server/follows' |
27 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' | 27 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
28 | import { VideoBlocklist, VideoBlockType } from '../../../../shared/models/videos' | 28 | import { VideoBlacklist, VideoBlacklistType } from '../../../../shared/models/videos' |
29 | import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model' | 29 | import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model' |
30 | import { User, UserRole } from '../../../../shared/models/users' | 30 | import { User, UserRole } from '../../../../shared/models/users' |
31 | import { getMagnetURI, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports' | 31 | import { getMagnetURI, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports' |
@@ -127,7 +127,7 @@ describe('Test video blacklist', function () { | |||
127 | const res = await getBlacklistedVideosList({ | 127 | const res = await getBlacklistedVideosList({ |
128 | url: servers[0].url, | 128 | url: servers[0].url, |
129 | token: servers[0].accessToken, | 129 | token: servers[0].accessToken, |
130 | type: VideoBlockType.MANUAL | 130 | type: VideoBlacklistType.MANUAL |
131 | }) | 131 | }) |
132 | 132 | ||
133 | expect(res.body.total).to.equal(2) | 133 | expect(res.body.total).to.equal(2) |
@@ -141,7 +141,7 @@ describe('Test video blacklist', function () { | |||
141 | const res = await getBlacklistedVideosList({ | 141 | const res = await getBlacklistedVideosList({ |
142 | url: servers[0].url, | 142 | url: servers[0].url, |
143 | token: servers[0].accessToken, | 143 | token: servers[0].accessToken, |
144 | type: VideoBlockType.AUTO_BEFORE_PUBLISHED | 144 | type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED |
145 | }) | 145 | }) |
146 | 146 | ||
147 | expect(res.body.total).to.equal(0) | 147 | expect(res.body.total).to.equal(0) |
@@ -219,7 +219,7 @@ describe('Test video blacklist', function () { | |||
219 | }) | 219 | }) |
220 | 220 | ||
221 | describe('When removing a blacklisted video', function () { | 221 | describe('When removing a blacklisted video', function () { |
222 | let videoToRemove: VideoBlocklist | 222 | let videoToRemove: VideoBlacklist |
223 | let blacklist = [] | 223 | let blacklist = [] |
224 | 224 | ||
225 | it('Should not have any video in videos list on server 1', async function () { | 225 | it('Should not have any video in videos list on server 1', async function () { |
@@ -328,7 +328,7 @@ describe('Test video blacklist', function () { | |||
328 | it('Should have the correct video blacklist unfederate attribute', async function () { | 328 | it('Should have the correct video blacklist unfederate attribute', async function () { |
329 | const res = await getBlacklistedVideosList({ url: servers[0].url, token: servers[0].accessToken, sort: 'createdAt' }) | 329 | const res = await getBlacklistedVideosList({ url: servers[0].url, token: servers[0].accessToken, sort: 'createdAt' }) |
330 | 330 | ||
331 | const blacklistedVideos: VideoBlocklist[] = res.body.data | 331 | const blacklistedVideos: VideoBlacklist[] = res.body.data |
332 | const video3Blacklisted = blacklistedVideos.find(b => b.video.uuid === video3UUID) | 332 | const video3Blacklisted = blacklistedVideos.find(b => b.video.uuid === video3UUID) |
333 | const video4Blacklisted = blacklistedVideos.find(b => b.video.uuid === video4UUID) | 333 | const video4Blacklisted = blacklistedVideos.find(b => b.video.uuid === video4UUID) |
334 | 334 | ||
@@ -396,7 +396,7 @@ describe('Test video blacklist', function () { | |||
396 | url: servers[0].url, | 396 | url: servers[0].url, |
397 | accessToken: servers[0].accessToken, | 397 | accessToken: servers[0].accessToken, |
398 | username: user.username, | 398 | username: user.username, |
399 | adminFlags: UserAdminFlag.BYPASS_VIDEO_AUTO_BLOCK, | 399 | adminFlags: UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST, |
400 | password: user.password, | 400 | password: user.password, |
401 | role: UserRole.USER | 401 | role: UserRole.USER |
402 | }) | 402 | }) |
@@ -413,7 +413,7 @@ describe('Test video blacklist', function () { | |||
413 | const res = await getBlacklistedVideosList({ | 413 | const res = await getBlacklistedVideosList({ |
414 | url: servers[0].url, | 414 | url: servers[0].url, |
415 | token: servers[0].accessToken, | 415 | token: servers[0].accessToken, |
416 | type: VideoBlockType.AUTO_BEFORE_PUBLISHED | 416 | type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED |
417 | }) | 417 | }) |
418 | 418 | ||
419 | expect(res.body.total).to.equal(1) | 419 | expect(res.body.total).to.equal(1) |
@@ -434,7 +434,7 @@ describe('Test video blacklist', function () { | |||
434 | url: servers[0].url, | 434 | url: servers[0].url, |
435 | token: servers[0].accessToken, | 435 | token: servers[0].accessToken, |
436 | sort: 'createdAt', | 436 | sort: 'createdAt', |
437 | type: VideoBlockType.AUTO_BEFORE_PUBLISHED | 437 | type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED |
438 | }) | 438 | }) |
439 | 439 | ||
440 | expect(res.body.total).to.equal(2) | 440 | expect(res.body.total).to.equal(2) |
@@ -453,7 +453,7 @@ describe('Test video blacklist', function () { | |||
453 | url: servers[0].url, | 453 | url: servers[0].url, |
454 | token: servers[0].accessToken, | 454 | token: servers[0].accessToken, |
455 | sort: 'createdAt', | 455 | sort: 'createdAt', |
456 | type: VideoBlockType.AUTO_BEFORE_PUBLISHED | 456 | type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED |
457 | }) | 457 | }) |
458 | 458 | ||
459 | expect(res.body.total).to.equal(3) | 459 | expect(res.body.total).to.equal(3) |
@@ -466,7 +466,7 @@ describe('Test video blacklist', function () { | |||
466 | const res = await getBlacklistedVideosList({ | 466 | const res = await getBlacklistedVideosList({ |
467 | url: servers[0].url, | 467 | url: servers[0].url, |
468 | token: servers[0].accessToken, | 468 | token: servers[0].accessToken, |
469 | type: VideoBlockType.AUTO_BEFORE_PUBLISHED | 469 | type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED |
470 | }) | 470 | }) |
471 | 471 | ||
472 | expect(res.body.total).to.equal(3) | 472 | expect(res.body.total).to.equal(3) |