From 576ad67aaccf713b2a923deb3cb9b2a990613985 Mon Sep 17 00:00:00 2001 From: Josh Morel Date: Sun, 17 Feb 2019 13:14:00 -0500 Subject: check email enabled for requiresEmailVer config --- server/tests/api/check-params/config.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'server/tests/api/check-params/config.ts') 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 () { }) }) + it('Should fail if email disabled and signup requires email verification', async function () { + // opposite scenario - succcess when enable enabled - covered via tests/api/users/user-verification.ts + const newUpdateParams = immutableAssign(updateParams, { + signup: { + enabled: true, + limit: 5, + requiresEmailVerification: true + } + }) + + await makePutBodyRequest({ + url: server.url, + path, + fields: newUpdateParams, + token: server.accessToken, + statusCodeExpected: 400 + }) + }) + it('Should success with the correct parameters', async function () { await makePutBodyRequest({ url: server.url, -- cgit v1.2.3