Usernames are case insensitive now

This commit is contained in:
Chocobozzz
2017-11-04 18:32:38 +01:00
parent f735448395
commit 563d032e97
4 changed files with 23 additions and 5 deletions

View File

@@ -112,6 +112,18 @@ describe('Test users API validators', function () {
await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
})
it('Should fail with a not lowercase username', async function () {
const fields = {
username: 'Toto',
email: 'test@example.com',
password: 'my_super_password',
videoQuota: 42000000,
role: UserRole.USER
}
await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
})
it('Should fail with an incorrect username', async function () {
const fields = {
username: 'my username',