aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params
diff options
context:
space:
mode:
authorJosh Morel <morel.josh@hotmail.com>2019-02-17 13:14:00 -0500
committerChocobozzz <chocobozzz@cpy.re>2019-02-18 17:21:41 +0100
commit576ad67aaccf713b2a923deb3cb9b2a990613985 (patch)
tree2feec6798bfe14aa25e73ddce653d06f3f41c7af /server/tests/api/check-params
parent41d713446c2152d47943ddb0c841a9e36ca5a9db (diff)
downloadPeerTube-576ad67aaccf713b2a923deb3cb9b2a990613985.tar.gz
PeerTube-576ad67aaccf713b2a923deb3cb9b2a990613985.tar.zst
PeerTube-576ad67aaccf713b2a923deb3cb9b2a990613985.zip
check email enabled for requiresEmailVer config
Diffstat (limited to 'server/tests/api/check-params')
-rw-r--r--server/tests/api/check-params/config.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts
index 07de2b5a5..3895c4f9a 100644
--- a/server/tests/api/check-params/config.ts
+++ b/server/tests/api/check-params/config.ts
@@ -167,6 +167,25 @@ describe('Test config API validators', function () {
167 }) 167 })
168 }) 168 })
169 169
170 it('Should fail if email disabled and signup requires email verification', async function () {
171 // opposite scenario - succcess when enable enabled - covered via tests/api/users/user-verification.ts
172 const newUpdateParams = immutableAssign(updateParams, {
173 signup: {
174 enabled: true,
175 limit: 5,
176 requiresEmailVerification: true
177 }
178 })
179
180 await makePutBodyRequest({
181 url: server.url,
182 path,
183 fields: newUpdateParams,
184 token: server.accessToken,
185 statusCodeExpected: 400
186 })
187 })
188
170 it('Should success with the correct parameters', async function () { 189 it('Should success with the correct parameters', async function () {
171 await makePutBodyRequest({ 190 await makePutBodyRequest({
172 url: server.url, 191 url: server.url,