aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/moderation
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/moderation')
-rw-r--r--server/tests/api/moderation/video-blacklist.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/tests/api/moderation/video-blacklist.ts b/server/tests/api/moderation/video-blacklist.ts
index 17a68e4a6..c72ebc16b 100644
--- a/server/tests/api/moderation/video-blacklist.ts
+++ b/server/tests/api/moderation/video-blacklist.ts
@@ -12,6 +12,7 @@ import {
12 getMyUserInformation, 12 getMyUserInformation,
13 getMyVideos, 13 getMyVideos,
14 getVideosList, 14 getVideosList,
15 ImportsCommand,
15 killallServers, 16 killallServers,
16 reRunServer, 17 reRunServer,
17 ServerInfo, 18 ServerInfo,
@@ -21,7 +22,6 @@ import {
21 userLogin, 22 userLogin,
22 waitJobs 23 waitJobs
23} from '@shared/extra-utils' 24} from '@shared/extra-utils'
24import { getGoodVideoUrl, getMagnetURI, importVideo } from '@shared/extra-utils/videos/video-imports'
25import { User, UserAdminFlag, UserRole, VideoBlacklist, VideoBlacklistType } from '@shared/models' 25import { User, UserAdminFlag, UserRole, VideoBlacklist, VideoBlacklistType } from '@shared/models'
26 26
27const expect = chai.expect 27const expect = chai.expect
@@ -402,11 +402,11 @@ describe('Test video blacklist', function () {
402 this.timeout(15000) 402 this.timeout(15000)
403 403
404 const attributes = { 404 const attributes = {
405 targetUrl: getGoodVideoUrl(), 405 targetUrl: ImportsCommand.getGoodVideoUrl(),
406 name: 'URL import', 406 name: 'URL import',
407 channelId: channelOfUserWithoutFlag 407 channelId: channelOfUserWithoutFlag
408 } 408 }
409 await importVideo(servers[0].url, userWithoutFlag, attributes) 409 await servers[0].importsCommand.importVideo({ token: userWithoutFlag, attributes })
410 410
411 const body = await command.list({ sort: 'createdAt', type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED }) 411 const body = await command.list({ sort: 'createdAt', type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED })
412 expect(body.total).to.equal(2) 412 expect(body.total).to.equal(2)
@@ -415,11 +415,11 @@ describe('Test video blacklist', function () {
415 415
416 it('Should auto blacklist a video on torrent import', async function () { 416 it('Should auto blacklist a video on torrent import', async function () {
417 const attributes = { 417 const attributes = {
418 magnetUri: getMagnetURI(), 418 magnetUri: ImportsCommand.getMagnetURI(),
419 name: 'Torrent import', 419 name: 'Torrent import',
420 channelId: channelOfUserWithoutFlag 420 channelId: channelOfUserWithoutFlag
421 } 421 }
422 await importVideo(servers[0].url, userWithoutFlag, attributes) 422 await servers[0].importsCommand.importVideo({ token: userWithoutFlag, attributes })
423 423
424 const body = await command.list({ sort: 'createdAt', type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED }) 424 const body = await command.list({ sort: 'createdAt', type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED })
425 expect(body.total).to.equal(3) 425 expect(body.total).to.equal(3)