aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-03-01 08:32:49 +0100
committerChocobozzz <me@florianbigard.com>2022-03-01 08:32:49 +0100
commit242f52253e46ce0ffd7349cb06bcd887bb89cf06 (patch)
tree91ff643ea722881a5e11e4446a3c696ec0f6e3cb /server/tests/api/videos
parentf41efa52a412272928ba90e06c9a9a9c471d1ca3 (diff)
downloadPeerTube-242f52253e46ce0ffd7349cb06bcd887bb89cf06.tar.gz
PeerTube-242f52253e46ce0ffd7349cb06bcd887bb89cf06.tar.zst
PeerTube-242f52253e46ce0ffd7349cb06bcd887bb89cf06.zip
Fix getting avatars in videos list
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r--server/tests/api/videos/multiple-servers.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts
index 5bbc60559..2a49fd360 100644
--- a/server/tests/api/videos/multiple-servers.ts
+++ b/server/tests/api/videos/multiple-servers.ts
@@ -2,6 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { and } from 'sequelize/dist'
5import request from 'supertest' 6import request from 'supertest'
6import { 7import {
7 checkTmpIsEmpty, 8 checkTmpIsEmpty,
@@ -17,6 +18,7 @@ import {
17 cleanupTests, 18 cleanupTests,
18 createMultipleServers, 19 createMultipleServers,
19 doubleFollow, 20 doubleFollow,
21 makeGetRequest,
20 PeerTubeServer, 22 PeerTubeServer,
21 setAccessTokensToServers, 23 setAccessTokensToServers,
22 setDefaultAccountAvatar, 24 setDefaultAccountAvatar,
@@ -138,6 +140,22 @@ describe('Test multiple servers', function () {
138 140
139 await completeVideoCheck(server, video, checkAttributes) 141 await completeVideoCheck(server, video, checkAttributes)
140 publishedAt = video.publishedAt as string 142 publishedAt = video.publishedAt as string
143
144 expect(video.channel.avatars).to.have.lengthOf(2)
145 expect(video.account.avatars).to.have.lengthOf(2)
146
147 for (const image of [ ...video.channel.avatars, ...video.account.avatars ]) {
148 expect(image.createdAt).to.exist
149 expect(image.updatedAt).to.exist
150 expect(image.width).to.be.above(20).and.below(1000)
151 expect(image.path).to.exist
152
153 await makeGetRequest({
154 url: server.url,
155 path: image.path,
156 expectedStatus: HttpStatusCode.OK_200
157 })
158 }
141 } 159 }
142 }) 160 })
143 161