mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Add more tests on registration request conflict
This commit is contained in:
@@ -254,7 +254,7 @@ describe('Test registrations API validators', function () {
|
||||
})
|
||||
})
|
||||
|
||||
it('Should fail if the user is already awaiting registration approval', async function () {
|
||||
it('Should fail if the username is already awaiting registration approval', async function () {
|
||||
await server.registrations.requestRegistration({
|
||||
username: 'user_request_2',
|
||||
registrationReason: 'tt',
|
||||
@@ -266,6 +266,19 @@ describe('Test registrations API validators', function () {
|
||||
})
|
||||
})
|
||||
|
||||
it('Should fail if the email is already awaiting registration approval', async function () {
|
||||
await server.registrations.requestRegistration({
|
||||
username: 'user42',
|
||||
email: 'user_request_2@example.com',
|
||||
registrationReason: 'tt',
|
||||
channel: {
|
||||
displayName: 'my user request 42 channel',
|
||||
name: 'user_request_42_channel'
|
||||
},
|
||||
expectedStatus: HttpStatusCode.CONFLICT_409
|
||||
})
|
||||
})
|
||||
|
||||
it('Should fail if the channel is already awaiting registration approval', async function () {
|
||||
await server.registrations.requestRegistration({
|
||||
username: 'user42',
|
||||
|
||||
Reference in New Issue
Block a user