import 'mocha'
import * as chai from 'chai'
+import { and } from 'sequelize/dist'
import request from 'supertest'
import {
checkTmpIsEmpty,
cleanupTests,
createMultipleServers,
doubleFollow,
+ makeGetRequest,
PeerTubeServer,
setAccessTokensToServers,
setDefaultAccountAvatar,
await completeVideoCheck(server, video, checkAttributes)
publishedAt = video.publishedAt as string
+
+ expect(video.channel.avatars).to.have.lengthOf(2)
+ expect(video.account.avatars).to.have.lengthOf(2)
+
+ for (const image of [ ...video.channel.avatars, ...video.account.avatars ]) {
+ expect(image.createdAt).to.exist
+ expect(image.updatedAt).to.exist
+ expect(image.width).to.be.above(20).and.below(1000)
+ expect(image.path).to.exist
+
+ await makeGetRequest({
+ url: server.url,
+ path: image.path,
+ expectedStatus: HttpStatusCode.OK_200
+ })
+ }
}
})