+ await server.videos.upload({ token: accessToken, attributes: { name: 'my super video' } })
+ })
+
+ it('Should not be able to login if the user is banned', async function () {
+ await server.users.banUser({ userId })
+
+ await server.login.login({
+ user: { username: 'fry@planetexpress.com', password: 'fry' },
+ expectedStatus: HttpStatusCode.BAD_REQUEST_400
+ })
+ })
+
+ it('Should be able to login if the user is unbanned', async function () {
+ await server.users.unbanUser({ userId })
+
+ await server.login.login({ user: { username: 'fry@planetexpress.com', password: 'fry' } })
+ })
+
+ it('Should not be able to ask password reset', async function () {
+ await server.users.askResetPassword({ email: 'fry@planetexpress.com', expectedStatus: HttpStatusCode.CONFLICT_409 })
+ })
+
+ it('Should not be able to ask email verification', async function () {
+ await server.users.askSendVerifyEmail({ email: 'fry@planetexpress.com', expectedStatus: HttpStatusCode.CONFLICT_409 })