diff options
Diffstat (limited to 'server/tests/api')
-rw-r--r-- | server/tests/api/videos/video-channels.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts index e50582218..d12d58e75 100644 --- a/server/tests/api/videos/video-channels.ts +++ b/server/tests/api/videos/video-channels.ts | |||
@@ -2,12 +2,14 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { basename } from 'path' | ||
5 | import { | 6 | import { |
6 | cleanupTests, | 7 | cleanupTests, |
7 | createUser, | 8 | createUser, |
8 | deleteVideoChannelImage, | 9 | deleteVideoChannelImage, |
9 | doubleFollow, | 10 | doubleFollow, |
10 | flushAndRunMultipleServers, | 11 | flushAndRunMultipleServers, |
12 | getActorImage, | ||
11 | getVideo, | 13 | getVideo, |
12 | getVideoChannel, | 14 | getVideoChannel, |
13 | getVideoChannelVideos, | 15 | getVideoChannelVideos, |
@@ -31,6 +33,7 @@ import { | |||
31 | } from '../../../../shared/extra-utils/index' | 33 | } from '../../../../shared/extra-utils/index' |
32 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' | 34 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
33 | import { User, Video, VideoChannel, VideoDetails } from '../../../../shared/index' | 35 | import { User, Video, VideoChannel, VideoDetails } from '../../../../shared/index' |
36 | import { ACTOR_IMAGES_SIZE } from '@server/initializers/constants' | ||
34 | 37 | ||
35 | const expect = chai.expect | 38 | const expect = chai.expect |
36 | 39 | ||
@@ -288,6 +291,10 @@ describe('Test video channels', function () { | |||
288 | const videoChannel = await findChannel(server, secondVideoChannelId) | 291 | const videoChannel = await findChannel(server, secondVideoChannelId) |
289 | 292 | ||
290 | await testImage(server.url, 'avatar-resized', videoChannel.avatar.path, '.png') | 293 | await testImage(server.url, 'avatar-resized', videoChannel.avatar.path, '.png') |
294 | |||
295 | const row = await getActorImage(server.internalServerNumber, basename(videoChannel.avatar.path)) | ||
296 | expect(row.height).to.equal(ACTOR_IMAGES_SIZE.AVATARS.height) | ||
297 | expect(row.width).to.equal(ACTOR_IMAGES_SIZE.AVATARS.width) | ||
291 | } | 298 | } |
292 | }) | 299 | }) |
293 | 300 | ||
@@ -311,6 +318,10 @@ describe('Test video channels', function () { | |||
311 | const videoChannel = res.body | 318 | const videoChannel = res.body |
312 | 319 | ||
313 | await testImage(server.url, 'banner-resized', videoChannel.banner.path) | 320 | await testImage(server.url, 'banner-resized', videoChannel.banner.path) |
321 | |||
322 | const row = await getActorImage(server.internalServerNumber, basename(videoChannel.banner.path)) | ||
323 | expect(row.height).to.equal(ACTOR_IMAGES_SIZE.BANNERS.height) | ||
324 | expect(row.width).to.equal(ACTOR_IMAGES_SIZE.BANNERS.width) | ||
314 | } | 325 | } |
315 | }) | 326 | }) |
316 | 327 | ||