aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r--server/tests/api/videos/video-channels.ts34
1 files changed, 33 insertions, 1 deletions
diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts
index ad543e2d6..e4e3ce9d9 100644
--- a/server/tests/api/videos/video-channels.ts
+++ b/server/tests/api/videos/video-channels.ts
@@ -3,7 +3,14 @@
3import * as chai from 'chai' 3import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { User, Video } from '../../../../shared/index' 5import { User, Video } from '../../../../shared/index'
6import { doubleFollow, flushAndRunMultipleServers, getVideoChannelVideos, updateVideo, uploadVideo } from '../../utils' 6import {
7 doubleFollow,
8 flushAndRunMultipleServers,
9 getVideoChannelVideos, testImage,
10 updateVideo,
11 updateVideoChannelAvatar,
12 uploadVideo, wait
13} from '../../utils'
7import { 14import {
8 addVideoChannel, 15 addVideoChannel,
9 deleteVideoChannel, 16 deleteVideoChannel,
@@ -159,6 +166,31 @@ describe('Test video channels', function () {
159 } 166 }
160 }) 167 })
161 168
169 it('Should update video channel avatar', async function () {
170 this.timeout(5000)
171
172 const fixture = 'avatar.png'
173
174 await updateVideoChannelAvatar({
175 url: servers[0].url,
176 accessToken: servers[0].accessToken,
177 videoChannelId: secondVideoChannelId,
178 fixture
179 })
180
181 await waitJobs(servers)
182 })
183
184 it('Should have video channel avatar updated', async function () {
185 for (const server of servers) {
186 const res = await getVideoChannelsList(server.url, 0, 1, '-name')
187
188 const videoChannel = res.body.data.find(c => c.id === secondVideoChannelId)
189
190 await testImage(server.url, 'avatar-resized', videoChannel.avatar.path, '.png')
191 }
192 })
193
162 it('Should get video channel', async function () { 194 it('Should get video channel', async function () {
163 const res = await getVideoChannel(servers[0].url, secondVideoChannelId) 195 const res = await getVideoChannel(servers[0].url, secondVideoChannelId)
164 196