aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/video-channels.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 09:47:51 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit254d3579f5338f5fd775c17d15cdfc37078bcfb4 (patch)
treeeaeb13fda16c16e98cd6991d202b0ca6a4cbdb63 /server/tests/api/videos/video-channels.ts
parent89d241a79c262b9775c233b73cff080043ebb5e6 (diff)
downloadPeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.gz
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.zst
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.zip
Use an object to represent a server
Diffstat (limited to 'server/tests/api/videos/video-channels.ts')
-rw-r--r--server/tests/api/videos/video-channels.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts
index 1efef932c..140fee7fe 100644
--- a/server/tests/api/videos/video-channels.ts
+++ b/server/tests/api/videos/video-channels.ts
@@ -7,8 +7,8 @@ import { ACTOR_IMAGES_SIZE } from '@server/initializers/constants'
7import { 7import {
8 cleanupTests, 8 cleanupTests,
9 doubleFollow, 9 doubleFollow,
10 flushAndRunMultipleServers, 10 createMultipleServers,
11 ServerInfo, 11 PeerTubeServer,
12 setAccessTokensToServers, 12 setAccessTokensToServers,
13 setDefaultVideoChannel, 13 setDefaultVideoChannel,
14 testFileExistsOrNot, 14 testFileExistsOrNot,
@@ -20,14 +20,14 @@ import { User, VideoChannel } from '@shared/models'
20 20
21const expect = chai.expect 21const expect = chai.expect
22 22
23async function findChannel (server: ServerInfo, channelId: number) { 23async function findChannel (server: PeerTubeServer, channelId: number) {
24 const body = await server.channels.list({ sort: '-name' }) 24 const body = await server.channels.list({ sort: '-name' })
25 25
26 return body.data.find(c => c.id === channelId) 26 return body.data.find(c => c.id === channelId)
27} 27}
28 28
29describe('Test video channels', function () { 29describe('Test video channels', function () {
30 let servers: ServerInfo[] 30 let servers: PeerTubeServer[]
31 let userInfo: User 31 let userInfo: User
32 let secondVideoChannelId: number 32 let secondVideoChannelId: number
33 let totoChannel: number 33 let totoChannel: number
@@ -40,7 +40,7 @@ describe('Test video channels', function () {
40 before(async function () { 40 before(async function () {
41 this.timeout(60000) 41 this.timeout(60000)
42 42
43 servers = await flushAndRunMultipleServers(2) 43 servers = await createMultipleServers(2)
44 44
45 await setAccessTokensToServers(servers) 45 await setAccessTokensToServers(servers)
46 await setDefaultVideoChannel(servers) 46 await setDefaultVideoChannel(servers)