aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils/videos')
-rw-r--r--server/tests/utils/videos/video-channels.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/tests/utils/videos/video-channels.ts b/server/tests/utils/videos/video-channels.ts
index a064598f4..3ca39469c 100644
--- a/server/tests/utils/videos/video-channels.ts
+++ b/server/tests/utils/videos/video-channels.ts
@@ -1,5 +1,6 @@
1import * as request from 'supertest' 1import * as request from 'supertest'
2import { VideoChannelCreate, VideoChannelUpdate } from '../../../../shared/models/videos' 2import { VideoChannelCreate, VideoChannelUpdate } from '../../../../shared/models/videos'
3import { updateAvatarRequest } from '../index'
3 4
4function getVideoChannelsList (url: string, start: number, count: number, sort?: string) { 5function getVideoChannelsList (url: string, start: number, count: number, sort?: string) {
5 const path = '/api/v1/video-channels' 6 const path = '/api/v1/video-channels'
@@ -92,9 +93,22 @@ function getVideoChannel (url: string, channelId: number | string) {
92 .expect('Content-Type', /json/) 93 .expect('Content-Type', /json/)
93} 94}
94 95
96function updateVideoChannelAvatar (options: {
97 url: string,
98 accessToken: string,
99 fixture: string,
100 videoChannelId: string | number
101}) {
102
103 const path = '/api/v1/video-channels/' + options.videoChannelId + '/avatar/pick'
104
105 return updateAvatarRequest(Object.assign(options, { path }))
106}
107
95// --------------------------------------------------------------------------- 108// ---------------------------------------------------------------------------
96 109
97export { 110export {
111 updateVideoChannelAvatar,
98 getVideoChannelsList, 112 getVideoChannelsList,
99 getAccountVideoChannelsList, 113 getAccountVideoChannelsList,
100 addVideoChannel, 114 addVideoChannel,