```
$ sudo -u postgres createuser you_username --createdb --superuser
-$ createdb -O peertube peertube_test{1,2,3,4,5,6}
+$ npm run clean:server:test
```
Build the application and run the unit/integration tests:
```
-$ npm run build
+$ npm run build -- --light
$ npm test
```
static loadByUsername (username: string) {
const query = {
where: {
- username
+ username: { [ Op.iLike ]: username }
}
}
static loadByUsernameAndPopulateChannels (username: string) {
const query = {
where: {
- username
+ username: { [ Op.iLike ]: username }
}
}
const query = {
where: {
- [ Op.or ]: [ { username }, { email } ]
+ [ Op.or ]: [ { username: { [ Op.iLike ]: username } }, { email } ]
}
}
accessToken = res.body.access_token
})
+
+ it('Should be able to login with an insensitive username', async function () {
+ const user = { username: 'RoOt', password: server.user.password }
+ const res = await login(server.url, server.client, user, 200)
+
+ const user2 = { username: 'rOoT', password: server.user.password }
+ const res2 = await login(server.url, server.client, user2, 200)
+
+ const user3 = { username: 'ROOt', password: server.user.password }
+ const res3 = await login(server.url, server.client, user3, 200)
+ })
})
describe('Upload', function () {