aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/check-params/config.ts1
-rw-r--r--server/tests/api/server/config.ts14
2 files changed, 15 insertions, 0 deletions
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts
index 9b902a1cd..9435bb1e8 100644
--- a/server/tests/api/check-params/config.ts
+++ b/server/tests/api/check-params/config.ts
@@ -34,6 +34,7 @@ describe('Test config API validators', function () {
34 administrator: 'Kuja', 34 administrator: 'Kuja',
35 maintenanceLifetime: 'forever', 35 maintenanceLifetime: 'forever',
36 businessModel: 'my super business model', 36 businessModel: 'my super business model',
37 hardwareInformation: '2vCore 3GB RAM',
37 38
38 languages: [ 'en', 'es' ], 39 languages: [ 'en', 'es' ],
39 categories: [ 1, 2 ], 40 categories: [ 1, 2 ],
diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts
index 85d0f9702..97cc99eea 100644
--- a/server/tests/api/server/config.ts
+++ b/server/tests/api/server/config.ts
@@ -36,6 +36,7 @@ function checkInitialConfig (server: ServerInfo, data: CustomConfig) {
36 expect(data.instance.administrator).to.be.empty 36 expect(data.instance.administrator).to.be.empty
37 expect(data.instance.maintenanceLifetime).to.be.empty 37 expect(data.instance.maintenanceLifetime).to.be.empty
38 expect(data.instance.businessModel).to.be.empty 38 expect(data.instance.businessModel).to.be.empty
39 expect(data.instance.hardwareInformation).to.be.empty
39 40
40 expect(data.instance.languages).to.have.lengthOf(0) 41 expect(data.instance.languages).to.have.lengthOf(0)
41 expect(data.instance.categories).to.have.lengthOf(0) 42 expect(data.instance.categories).to.have.lengthOf(0)
@@ -97,6 +98,7 @@ function checkUpdatedConfig (data: CustomConfig) {
97 expect(data.instance.administrator).to.equal('Kuja') 98 expect(data.instance.administrator).to.equal('Kuja')
98 expect(data.instance.maintenanceLifetime).to.equal('forever') 99 expect(data.instance.maintenanceLifetime).to.equal('forever')
99 expect(data.instance.businessModel).to.equal('my super business model') 100 expect(data.instance.businessModel).to.equal('my super business model')
101 expect(data.instance.hardwareInformation).to.equal('2vCore 3GB RAM')
100 102
101 expect(data.instance.languages).to.deep.equal([ 'en', 'es' ]) 103 expect(data.instance.languages).to.deep.equal([ 'en', 'es' ])
102 expect(data.instance.categories).to.deep.equal([ 1, 2 ]) 104 expect(data.instance.categories).to.deep.equal([ 1, 2 ])
@@ -219,6 +221,7 @@ describe('Test config', function () {
219 administrator: 'Kuja', 221 administrator: 'Kuja',
220 maintenanceLifetime: 'forever', 222 maintenanceLifetime: 'forever',
221 businessModel: 'my super business model', 223 businessModel: 'my super business model',
224 hardwareInformation: '2vCore 3GB RAM',
222 225
223 languages: [ 'en', 'es' ], 226 languages: [ 'en', 'es' ],
224 categories: [ 1, 2 ], 227 categories: [ 1, 2 ],
@@ -362,6 +365,17 @@ describe('Test config', function () {
362 expect(data.instance.shortDescription).to.equal('my short description') 365 expect(data.instance.shortDescription).to.equal('my short description')
363 expect(data.instance.description).to.equal('my super description') 366 expect(data.instance.description).to.equal('my super description')
364 expect(data.instance.terms).to.equal('my super terms') 367 expect(data.instance.terms).to.equal('my super terms')
368 expect(data.instance.codeOfConduct).to.equal('my super coc')
369
370 expect(data.instance.creationReason).to.equal('my super creation reason')
371 expect(data.instance.moderationInformation).to.equal('my super moderation information')
372 expect(data.instance.administrator).to.equal('Kuja')
373 expect(data.instance.maintenanceLifetime).to.equal('forever')
374 expect(data.instance.businessModel).to.equal('my super business model')
375 expect(data.instance.hardwareInformation).to.equal('2vCore 3GB RAM')
376
377 expect(data.instance.languages).to.deep.equal([ 'en', 'es' ])
378 expect(data.instance.categories).to.deep.equal([ 1, 2 ])
365 }) 379 })
366 380
367 it('Should remove the custom configuration', async function () { 381 it('Should remove the custom configuration', async function () {