mirror of https://github.com/Chocobozzz/PeerTube
Add more tests on registration request conflict
parent
89fc014262
commit
7590f7a868
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue