diff options
Diffstat (limited to 'server/tests/cli/update-host.ts')
-rw-r--r-- | server/tests/cli/update-host.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/server/tests/cli/update-host.ts b/server/tests/cli/update-host.ts index f6131a99f..09a3dd1e7 100644 --- a/server/tests/cli/update-host.ts +++ b/server/tests/cli/update-host.ts | |||
@@ -2,13 +2,11 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { | 4 | import { |
5 | addVideoChannel, | ||
6 | addVideoCommentThread, | 5 | addVideoCommentThread, |
7 | cleanupTests, | 6 | cleanupTests, |
8 | createUser, | 7 | createUser, |
9 | flushAndRunServer, | 8 | flushAndRunServer, |
10 | getVideo, | 9 | getVideo, |
11 | getVideoChannelsList, | ||
12 | getVideosList, | 10 | getVideosList, |
13 | killallServers, | 11 | killallServers, |
14 | makeActivityPubGetRequest, | 12 | makeActivityPubGetRequest, |
@@ -53,7 +51,7 @@ describe('Test update host scripts', function () { | |||
53 | displayName: 'second video channel', | 51 | displayName: 'second video channel', |
54 | description: 'super video channel description' | 52 | description: 'super video channel description' |
55 | } | 53 | } |
56 | await addVideoChannel(server.url, server.accessToken, videoChannel) | 54 | await server.channelsCommand.create({ attributes: videoChannel }) |
57 | 55 | ||
58 | // Create comments | 56 | // Create comments |
59 | const text = 'my super first comment' | 57 | const text = 'my super first comment' |
@@ -91,10 +89,10 @@ describe('Test update host scripts', function () { | |||
91 | }) | 89 | }) |
92 | 90 | ||
93 | it('Should have updated video channels url', async function () { | 91 | it('Should have updated video channels url', async function () { |
94 | const res = await getVideoChannelsList(server.url, 0, 5, '-name') | 92 | const { data, total } = await server.channelsCommand.list({ sort: '-name' }) |
95 | expect(res.body.total).to.equal(3) | 93 | expect(total).to.equal(3) |
96 | 94 | ||
97 | for (const channel of res.body.data) { | 95 | for (const channel of data) { |
98 | const { body } = await makeActivityPubGetRequest(server.url, '/video-channels/' + channel.name) | 96 | const { body } = await makeActivityPubGetRequest(server.url, '/video-channels/' + channel.name) |
99 | 97 | ||
100 | expect(body.id).to.equal('http://localhost:9002/video-channels/' + channel.name) | 98 | expect(body.id).to.equal('http://localhost:9002/video-channels/' + channel.name) |