diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-31 17:47:36 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-31 17:51:04 +0100 |
commit | 36f9424ff192b0584a433bc196bced6fcf265808 (patch) | |
tree | 35d9fa5c53b228f5e7fc27bcc82854d035e9dde8 /server/tests/api | |
parent | 66b16cafb380012d3eca14e524d86f2450e04069 (diff) | |
download | PeerTube-36f9424ff192b0584a433bc196bced6fcf265808.tar.gz PeerTube-36f9424ff192b0584a433bc196bced6fcf265808.tar.zst PeerTube-36f9424ff192b0584a433bc196bced6fcf265808.zip |
Add about page
Diffstat (limited to 'server/tests/api')
-rw-r--r-- | server/tests/api/server/config.ts | 16 |
1 files changed, 15 insertions, 1 deletions
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 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { deleteCustomConfig, killallServers, reRunServer } from '../../utils' | 5 | import { About } from '../../../../shared/models/config/about.model' |
6 | import { deleteCustomConfig, getAbout, killallServers, reRunServer } from '../../utils' | ||
6 | const expect = chai.expect | 7 | const expect = chai.expect |
7 | 8 | ||
8 | import { | 9 | import { |
@@ -108,6 +109,7 @@ describe('Test config', function () { | |||
108 | expect(data.instance.name).to.equal('PeerTube updated') | 109 | expect(data.instance.name).to.equal('PeerTube updated') |
109 | expect(data.instance.description).to.equal('my super description') | 110 | expect(data.instance.description).to.equal('my super description') |
110 | expect(data.instance.terms).to.equal('my super terms') | 111 | expect(data.instance.terms).to.equal('my super terms') |
112 | expect(data.cache.previews.size).to.equal(2) | ||
111 | expect(data.signup.enabled).to.be.false | 113 | expect(data.signup.enabled).to.be.false |
112 | expect(data.signup.limit).to.equal(5) | 114 | expect(data.signup.limit).to.equal(5) |
113 | expect(data.admin.email).to.equal('superadmin1@example.com') | 115 | expect(data.admin.email).to.equal('superadmin1@example.com') |
@@ -131,6 +133,9 @@ describe('Test config', function () { | |||
131 | const res = await getCustomConfig(server.url, server.accessToken) | 133 | const res = await getCustomConfig(server.url, server.accessToken) |
132 | const data = res.body | 134 | const data = res.body |
133 | 135 | ||
136 | expect(data.instance.name).to.equal('PeerTube updated') | ||
137 | expect(data.instance.description).to.equal('my super description') | ||
138 | expect(data.instance.terms).to.equal('my super terms') | ||
134 | expect(data.cache.previews.size).to.equal(2) | 139 | expect(data.cache.previews.size).to.equal(2) |
135 | expect(data.signup.enabled).to.be.false | 140 | expect(data.signup.enabled).to.be.false |
136 | expect(data.signup.limit).to.equal(5) | 141 | expect(data.signup.limit).to.equal(5) |
@@ -145,6 +150,15 @@ describe('Test config', function () { | |||
145 | expect(data.transcoding.resolutions['1080p']).to.be.false | 150 | expect(data.transcoding.resolutions['1080p']).to.be.false |
146 | }) | 151 | }) |
147 | 152 | ||
153 | it('Should fetch the about information', async function () { | ||
154 | const res = await getAbout(server.url) | ||
155 | const data: About = res.body | ||
156 | |||
157 | expect(data.instance.name).to.equal('PeerTube updated') | ||
158 | expect(data.instance.description).to.equal('my super description') | ||
159 | expect(data.instance.terms).to.equal('my super terms') | ||
160 | }) | ||
161 | |||
148 | it('Should remove the custom configuration', async function () { | 162 | it('Should remove the custom configuration', async function () { |
149 | this.timeout(10000) | 163 | this.timeout(10000) |
150 | 164 | ||