diff options
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/check-params/config.ts | 1 | ||||
-rw-r--r-- | server/tests/api/server/config.ts | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts index 3895c4f9a..c6b460f23 100644 --- a/server/tests/api/check-params/config.ts +++ b/server/tests/api/check-params/config.ts | |||
@@ -19,6 +19,7 @@ describe('Test config API validators', function () { | |||
19 | shortDescription: 'my short description', | 19 | shortDescription: 'my short description', |
20 | description: 'my super description', | 20 | description: 'my super description', |
21 | terms: 'my super terms', | 21 | terms: 'my super terms', |
22 | isNSFW: true, | ||
22 | defaultClientRoute: '/videos/recently-added', | 23 | defaultClientRoute: '/videos/recently-added', |
23 | defaultNSFWPolicy: 'blur', | 24 | defaultNSFWPolicy: 'blur', |
24 | customizations: { | 25 | customizations: { |
diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts index 3be1c9431..42927605d 100644 --- a/server/tests/api/server/config.ts +++ b/server/tests/api/server/config.ts | |||
@@ -30,6 +30,7 @@ function checkInitialConfig (data: CustomConfig) { | |||
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 | expect(data.instance.terms).to.equal('No terms for now.') | 31 | expect(data.instance.terms).to.equal('No terms for now.') |
32 | expect(data.instance.defaultClientRoute).to.equal('/videos/trending') | 32 | expect(data.instance.defaultClientRoute).to.equal('/videos/trending') |
33 | expect(data.instance.isNSFW).to.be.false | ||
33 | expect(data.instance.defaultNSFWPolicy).to.equal('display') | 34 | expect(data.instance.defaultNSFWPolicy).to.equal('display') |
34 | expect(data.instance.customizations.css).to.be.empty | 35 | expect(data.instance.customizations.css).to.be.empty |
35 | expect(data.instance.customizations.javascript).to.be.empty | 36 | expect(data.instance.customizations.javascript).to.be.empty |
@@ -69,6 +70,7 @@ function checkUpdatedConfig (data: CustomConfig) { | |||
69 | expect(data.instance.description).to.equal('my super description') | 70 | expect(data.instance.description).to.equal('my super description') |
70 | expect(data.instance.terms).to.equal('my super terms') | 71 | expect(data.instance.terms).to.equal('my super terms') |
71 | expect(data.instance.defaultClientRoute).to.equal('/videos/recently-added') | 72 | expect(data.instance.defaultClientRoute).to.equal('/videos/recently-added') |
73 | expect(data.instance.isNSFW).to.be.true | ||
72 | expect(data.instance.defaultNSFWPolicy).to.equal('blur') | 74 | expect(data.instance.defaultNSFWPolicy).to.equal('blur') |
73 | expect(data.instance.customizations.javascript).to.equal('alert("coucou")') | 75 | expect(data.instance.customizations.javascript).to.equal('alert("coucou")') |
74 | expect(data.instance.customizations.css).to.equal('body { background-color: red; }') | 76 | expect(data.instance.customizations.css).to.equal('body { background-color: red; }') |
@@ -163,6 +165,7 @@ describe('Test config', function () { | |||
163 | description: 'my super description', | 165 | description: 'my super description', |
164 | terms: 'my super terms', | 166 | terms: 'my super terms', |
165 | defaultClientRoute: '/videos/recently-added', | 167 | defaultClientRoute: '/videos/recently-added', |
168 | isNSFW: true, | ||
166 | defaultNSFWPolicy: 'blur' as 'blur', | 169 | defaultNSFWPolicy: 'blur' as 'blur', |
167 | customizations: { | 170 | customizations: { |
168 | javascript: 'alert("coucou")', | 171 | javascript: 'alert("coucou")', |