diff options
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/videos/multiple-servers.ts | 18 |
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 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { and } from 'sequelize/dist' | ||
5 | import request from 'supertest' | 6 | import request from 'supertest' |
6 | import { | 7 | import { |
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 | ||