diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-09 11:21:30 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | a54618880c394ad7571f3f3222dc96ec2dd10d9a (patch) | |
tree | c9f7b05e578abc2383bccd707c11438c61857c72 /server/tests/api/videos/video-playlists.ts | |
parent | 57f879a540551c3b958b0991c8e1e3657a4481d8 (diff) | |
download | PeerTube-a54618880c394ad7571f3f3222dc96ec2dd10d9a.tar.gz PeerTube-a54618880c394ad7571f3f3222dc96ec2dd10d9a.tar.zst PeerTube-a54618880c394ad7571f3f3222dc96ec2dd10d9a.zip |
Introduce channels command
Diffstat (limited to 'server/tests/api/videos/video-playlists.ts')
-rw-r--r-- | server/tests/api/videos/video-playlists.ts | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/server/tests/api/videos/video-playlists.ts b/server/tests/api/videos/video-playlists.ts index 4de6b3abf..2bb019348 100644 --- a/server/tests/api/videos/video-playlists.ts +++ b/server/tests/api/videos/video-playlists.ts | |||
@@ -4,11 +4,9 @@ import 'mocha' | |||
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { HttpStatusCode } from '@shared/core-utils' | 5 | import { HttpStatusCode } from '@shared/core-utils' |
6 | import { | 6 | import { |
7 | addVideoChannel, | ||
8 | checkPlaylistFilesWereRemoved, | 7 | checkPlaylistFilesWereRemoved, |
9 | cleanupTests, | 8 | cleanupTests, |
10 | createUser, | 9 | createUser, |
11 | deleteVideoChannel, | ||
12 | doubleFollow, | 10 | doubleFollow, |
13 | flushAndRunMultipleServers, | 11 | flushAndRunMultipleServers, |
14 | generateUserAccessToken, | 12 | generateUserAccessToken, |
@@ -1096,20 +1094,19 @@ describe('Test video playlists', function () { | |||
1096 | it('Should delete a channel and put the associated playlist in private mode', async function () { | 1094 | it('Should delete a channel and put the associated playlist in private mode', async function () { |
1097 | this.timeout(30000) | 1095 | this.timeout(30000) |
1098 | 1096 | ||
1099 | const res = await addVideoChannel(servers[0].url, servers[0].accessToken, { name: 'super_channel', displayName: 'super channel' }) | 1097 | const channel = await servers[0].channelsCommand.create({ attributes: { name: 'super_channel', displayName: 'super channel' } }) |
1100 | const videoChannelId = res.body.videoChannel.id | ||
1101 | 1098 | ||
1102 | const playlistCreated = await commands[0].create({ | 1099 | const playlistCreated = await commands[0].create({ |
1103 | attributes: { | 1100 | attributes: { |
1104 | displayName: 'channel playlist', | 1101 | displayName: 'channel playlist', |
1105 | privacy: VideoPlaylistPrivacy.PUBLIC, | 1102 | privacy: VideoPlaylistPrivacy.PUBLIC, |
1106 | videoChannelId | 1103 | videoChannelId: channel.id |
1107 | } | 1104 | } |
1108 | }) | 1105 | }) |
1109 | 1106 | ||
1110 | await waitJobs(servers) | 1107 | await waitJobs(servers) |
1111 | 1108 | ||
1112 | await deleteVideoChannel(servers[0].url, servers[0].accessToken, 'super_channel') | 1109 | await servers[0].channelsCommand.delete({ channelName: 'super_channel' }) |
1113 | 1110 | ||
1114 | await waitJobs(servers) | 1111 | await waitJobs(servers) |
1115 | 1112 | ||