From 563d032e97cc62de50281e6413a8a03ed37a3d3b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sat, 4 Nov 2017 18:32:38 +0100 Subject: Usernames are case insensitive now --- server/tests/api/check-params/users.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'server/tests/api/check-params/users.ts') diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts index 687999c09..578fece49 100644 --- a/server/tests/api/check-params/users.ts +++ b/server/tests/api/check-params/users.ts @@ -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', -- cgit v1.2.3