aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/check-params/config.ts10
-rw-r--r--server/tests/api/server/config.ts30
2 files changed, 40 insertions, 0 deletions
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts
index 1221735c5..f716dc673 100644
--- a/server/tests/api/check-params/config.ts
+++ b/server/tests/api/check-params/config.ts
@@ -27,6 +27,16 @@ describe('Test config API validators', function () {
27 shortDescription: 'my short description', 27 shortDescription: 'my short description',
28 description: 'my super description', 28 description: 'my super description',
29 terms: 'my super terms', 29 terms: 'my super terms',
30 codeOfConduct: 'my super coc',
31
32 moderationInformation: 'my super moderation information',
33 administrator: 'Kuja',
34 maintenanceLifetime: 'forever',
35 businessModel: 'my super business model',
36
37 languages: [ 'en', 'es' ],
38 categories: [ 1, 2 ],
39
30 isNSFW: true, 40 isNSFW: true,
31 defaultClientRoute: '/videos/recently-added', 41 defaultClientRoute: '/videos/recently-added',
32 defaultNSFWPolicy: 'blur', 42 defaultNSFWPolicy: 'blur',
diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts
index b2f1933d1..da75495a5 100644
--- a/server/tests/api/server/config.ts
+++ b/server/tests/api/server/config.ts
@@ -28,7 +28,17 @@ function checkInitialConfig (server: ServerInfo, data: CustomConfig) {
28 'with WebTorrent and Angular.' 28 'with WebTorrent and Angular.'
29 ) 29 )
30 expect(data.instance.description).to.equal('Welcome to this PeerTube instance!') 30 expect(data.instance.description).to.equal('Welcome to this PeerTube instance!')
31
31 expect(data.instance.terms).to.equal('No terms for now.') 32 expect(data.instance.terms).to.equal('No terms for now.')
33 expect(data.instance.codeOfConduct).to.be.empty
34 expect(data.instance.moderationInformation).to.be.empty
35 expect(data.instance.administrator).to.be.empty
36 expect(data.instance.maintenanceLifetime).to.be.empty
37 expect(data.instance.businessModel).to.be.empty
38
39 expect(data.instance.languages).to.have.lengthOf(0)
40 expect(data.instance.categories).to.have.lengthOf(0)
41
32 expect(data.instance.defaultClientRoute).to.equal('/videos/trending') 42 expect(data.instance.defaultClientRoute).to.equal('/videos/trending')
33 expect(data.instance.isNSFW).to.be.false 43 expect(data.instance.isNSFW).to.be.false
34 expect(data.instance.defaultNSFWPolicy).to.equal('display') 44 expect(data.instance.defaultNSFWPolicy).to.equal('display')
@@ -78,7 +88,17 @@ function checkUpdatedConfig (data: CustomConfig) {
78 expect(data.instance.name).to.equal('PeerTube updated') 88 expect(data.instance.name).to.equal('PeerTube updated')
79 expect(data.instance.shortDescription).to.equal('my short description') 89 expect(data.instance.shortDescription).to.equal('my short description')
80 expect(data.instance.description).to.equal('my super description') 90 expect(data.instance.description).to.equal('my super description')
91
81 expect(data.instance.terms).to.equal('my super terms') 92 expect(data.instance.terms).to.equal('my super terms')
93 expect(data.instance.codeOfConduct).to.equal('my super coc')
94 expect(data.instance.moderationInformation).to.equal('my super moderation information')
95 expect(data.instance.administrator).to.equal('Kuja')
96 expect(data.instance.maintenanceLifetime).to.equal('forever')
97 expect(data.instance.businessModel).to.equal('my super business model')
98
99 expect(data.instance.languages).to.deep.equal([ 'en', 'es' ])
100 expect(data.instance.categories).to.deep.equal([ 1, 2 ])
101
82 expect(data.instance.defaultClientRoute).to.equal('/videos/recently-added') 102 expect(data.instance.defaultClientRoute).to.equal('/videos/recently-added')
83 expect(data.instance.isNSFW).to.be.true 103 expect(data.instance.isNSFW).to.be.true
84 expect(data.instance.defaultNSFWPolicy).to.equal('blur') 104 expect(data.instance.defaultNSFWPolicy).to.equal('blur')
@@ -190,6 +210,16 @@ describe('Test config', function () {
190 shortDescription: 'my short description', 210 shortDescription: 'my short description',
191 description: 'my super description', 211 description: 'my super description',
192 terms: 'my super terms', 212 terms: 'my super terms',
213 codeOfConduct: 'my super coc',
214
215 moderationInformation: 'my super moderation information',
216 administrator: 'Kuja',
217 maintenanceLifetime: 'forever',
218 businessModel: 'my super business model',
219
220 languages: [ 'en', 'es' ],
221 categories: [ 1, 2 ],
222
193 defaultClientRoute: '/videos/recently-added', 223 defaultClientRoute: '/videos/recently-added',
194 isNSFW: true, 224 isNSFW: true,
195 defaultNSFWPolicy: 'blur' as 'blur', 225 defaultNSFWPolicy: 'blur' as 'blur',