diff options
Diffstat (limited to 'server/tests/api/users/users-verification.ts')
-rw-r--r-- | server/tests/api/users/users-verification.ts | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/server/tests/api/users/users-verification.ts b/server/tests/api/users/users-verification.ts index 265cd6050..23f81d804 100644 --- a/server/tests/api/users/users-verification.ts +++ b/server/tests/api/users/users-verification.ts | |||
@@ -11,7 +11,6 @@ import { | |||
11 | login, | 11 | login, |
12 | registerUser, | 12 | registerUser, |
13 | ServerInfo, | 13 | ServerInfo, |
14 | updateCustomSubConfig, | ||
15 | updateMyUser, | 14 | updateMyUser, |
16 | userLogin, | 15 | userLogin, |
17 | verifyEmail | 16 | verifyEmail |
@@ -58,11 +57,13 @@ describe('Test users account verification', function () { | |||
58 | it('Should register user and send verification email if verification required', async function () { | 57 | it('Should register user and send verification email if verification required', async function () { |
59 | this.timeout(30000) | 58 | this.timeout(30000) |
60 | 59 | ||
61 | await updateCustomSubConfig(server.url, server.accessToken, { | 60 | await server.configCommand.updateCustomSubConfig({ |
62 | signup: { | 61 | newConfig: { |
63 | enabled: true, | 62 | signup: { |
64 | requiresEmailVerification: true, | 63 | enabled: true, |
65 | limit: 10 | 64 | requiresEmailVerification: true, |
65 | limit: 10 | ||
66 | } | ||
66 | } | 67 | } |
67 | }) | 68 | }) |
68 | 69 | ||
@@ -148,11 +149,13 @@ describe('Test users account verification', function () { | |||
148 | 149 | ||
149 | it('Should register user not requiring email verification if setting not enabled', async function () { | 150 | it('Should register user not requiring email verification if setting not enabled', async function () { |
150 | this.timeout(5000) | 151 | this.timeout(5000) |
151 | await updateCustomSubConfig(server.url, server.accessToken, { | 152 | await server.configCommand.updateCustomSubConfig({ |
152 | signup: { | 153 | newConfig: { |
153 | enabled: true, | 154 | signup: { |
154 | requiresEmailVerification: false, | 155 | enabled: true, |
155 | limit: 10 | 156 | requiresEmailVerification: false, |
157 | limit: 10 | ||
158 | } | ||
156 | } | 159 | } |
157 | }) | 160 | }) |
158 | 161 | ||
@@ -168,11 +171,13 @@ describe('Test users account verification', function () { | |||
168 | }) | 171 | }) |
169 | 172 | ||
170 | it('Should allow login for user with unverified email when setting later enabled', async function () { | 173 | it('Should allow login for user with unverified email when setting later enabled', async function () { |
171 | await updateCustomSubConfig(server.url, server.accessToken, { | 174 | await server.configCommand.updateCustomSubConfig({ |
172 | signup: { | 175 | newConfig: { |
173 | enabled: true, | 176 | signup: { |
174 | requiresEmailVerification: true, | 177 | enabled: true, |
175 | limit: 10 | 178 | requiresEmailVerification: true, |
179 | limit: 10 | ||
180 | } | ||
176 | } | 181 | } |
177 | }) | 182 | }) |
178 | 183 | ||