X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fserver%2Fconfig.ts;h=35a5c430bd11103a685ee9d74d6a3fc9412a1f74;hb=36f9424ff192b0584a433bc196bced6fcf265808;hp=f83e21e82c234404f5928021e263aeafefba1beb;hpb=66b16cafb380012d3eca14e524d86f2450e04069;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts index f83e21e82..35a5c430b 100644 --- a/server/tests/api/server/config.ts +++ b/server/tests/api/server/config.ts @@ -2,7 +2,8 @@ import 'mocha' import * as chai from 'chai' -import { deleteCustomConfig, killallServers, reRunServer } from '../../utils' +import { About } from '../../../../shared/models/config/about.model' +import { deleteCustomConfig, getAbout, killallServers, reRunServer } from '../../utils' const expect = chai.expect import { @@ -108,6 +109,7 @@ describe('Test config', function () { expect(data.instance.name).to.equal('PeerTube updated') expect(data.instance.description).to.equal('my super description') expect(data.instance.terms).to.equal('my super terms') + expect(data.cache.previews.size).to.equal(2) expect(data.signup.enabled).to.be.false expect(data.signup.limit).to.equal(5) expect(data.admin.email).to.equal('superadmin1@example.com') @@ -131,6 +133,9 @@ describe('Test config', function () { const res = await getCustomConfig(server.url, server.accessToken) const data = res.body + expect(data.instance.name).to.equal('PeerTube updated') + expect(data.instance.description).to.equal('my super description') + expect(data.instance.terms).to.equal('my super terms') expect(data.cache.previews.size).to.equal(2) expect(data.signup.enabled).to.be.false expect(data.signup.limit).to.equal(5) @@ -145,6 +150,15 @@ describe('Test config', function () { expect(data.transcoding.resolutions['1080p']).to.be.false }) + it('Should fetch the about information', async function () { + const res = await getAbout(server.url) + const data: About = res.body + + expect(data.instance.name).to.equal('PeerTube updated') + expect(data.instance.description).to.equal('my super description') + expect(data.instance.terms).to.equal('my super terms') + }) + it('Should remove the custom configuration', async function () { this.timeout(10000)