X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fcheck-params%2Fconfig.ts;h=d117f26e61b3faeeb924a68bd2d9076e25aa42dd;hb=5b9c965d5aa747f29b081289f930ee215fdc23c8;hp=07de2b5a511e83e135959e6d792d716aca74c9c7;hpb=88108880bbdba473cfe36ecbebc1c3c4f972e102;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts index 07de2b5a5..d117f26e6 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 () { shortDescription: 'my short description', description: 'my super description', terms: 'my super terms', + isNSFW: true, defaultClientRoute: '/videos/recently-added', defaultNSFWPolicy: 'blur', customizations: { @@ -79,6 +80,18 @@ describe('Test config API validators', function () { enabled: false } } + }, + autoBlacklist: { + videos: { + ofUsers: { + enabled: false + } + } + }, + followers: { + instance: { + enabled: false + } } } @@ -167,6 +180,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,