aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/registrations.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/check-params/registrations.ts')
-rw-r--r--server/tests/api/check-params/registrations.ts15
1 files changed, 14 insertions, 1 deletions
diff --git a/server/tests/api/check-params/registrations.ts b/server/tests/api/check-params/registrations.ts
index fe16ebd93..8cbecdd07 100644
--- a/server/tests/api/check-params/registrations.ts
+++ b/server/tests/api/check-params/registrations.ts
@@ -254,7 +254,7 @@ describe('Test registrations API validators', function () {
254 }) 254 })
255 }) 255 })
256 256
257 it('Should fail if the user is already awaiting registration approval', async function () { 257 it('Should fail if the username is already awaiting registration approval', async function () {
258 await server.registrations.requestRegistration({ 258 await server.registrations.requestRegistration({
259 username: 'user_request_2', 259 username: 'user_request_2',
260 registrationReason: 'tt', 260 registrationReason: 'tt',
@@ -266,6 +266,19 @@ describe('Test registrations API validators', function () {
266 }) 266 })
267 }) 267 })
268 268
269 it('Should fail if the email is already awaiting registration approval', async function () {
270 await server.registrations.requestRegistration({
271 username: 'user42',
272 email: 'user_request_2@example.com',
273 registrationReason: 'tt',
274 channel: {
275 displayName: 'my user request 42 channel',
276 name: 'user_request_42_channel'
277 },
278 expectedStatus: HttpStatusCode.CONFLICT_409
279 })
280 })
281
269 it('Should fail if the channel is already awaiting registration approval', async function () { 282 it('Should fail if the channel is already awaiting registration approval', async function () {
270 await server.registrations.requestRegistration({ 283 await server.registrations.requestRegistration({
271 username: 'user42', 284 username: 'user42',