/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
-import 'mocha'
import * as chai from 'chai'
import { XMLParser, XMLValidator } from 'fast-xml-parser'
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
createSingleServer,
doubleFollow,
makeGetRequest,
+ makeRawRequest,
PeerTubeServer,
setAccessTokensToServers,
setDefaultChannelAvatar,
chai.use(require('chai-xml'))
chai.use(require('chai-json-schema'))
chai.config.includeStack = true
+
const expect = chai.expect
describe('Test syndication feeds', () => {
await stopFfmpeg(ffmpeg)
})
+
+ it('Should have the channel avatar as feed icon', async function () {
+ const json = await servers[0].feed.getJSON({ feed: 'videos', query: { videoChannelId: rootChannelId }, ignoreCache: true })
+
+ const jsonObj = JSON.parse(json)
+ const imageUrl = jsonObj.icon
+ expect(imageUrl).to.include('/lazy-static/avatars/')
+ await makeRawRequest({ url: imageUrl, expectedStatus: HttpStatusCode.OK_200 })
+ })
})
describe('Video comments feed', function () {
{
const body = await servers[0].subscriptions.listVideos({ token: userAccessToken })
- expect(body.total).to.equal(2, "there should be 2 videos part of the subscription")
+ expect(body.total).to.equal(2, 'there should be 2 videos part of the subscription')
const query = { accountId: userAccountId, token: userFeedToken }
const json = await servers[0].feed.getJSON({ feed: 'subscriptions', query, ignoreCache: true })