+ await checkHook('action:api.user.registered')
+ })
+
+ it('Should run action:api.user.created', async function () {
+ const user = await servers[0].users.create({ username: 'created_user' })
+ userId = user.id
+
+ await checkHook('action:api.user.created')
+ })
+
+ it('Should run action:api.user.oauth2-got-token', async function () {
+ await servers[0].login.login({ user: { username: 'created_user' } })
+
+ await checkHook('action:api.user.oauth2-got-token')
+ })
+
+ it('Should run action:api.user.blocked', async function () {
+ await servers[0].users.banUser({ userId })
+
+ await checkHook('action:api.user.blocked')
+ })
+
+ it('Should run action:api.user.unblocked', async function () {
+ await servers[0].users.unbanUser({ userId })
+
+ await checkHook('action:api.user.unblocked')
+ })
+
+ it('Should run action:api.user.updated', async function () {
+ await servers[0].users.update({ userId, videoQuota: 50 })
+
+ await checkHook('action:api.user.updated')
+ })
+
+ it('Should run action:api.user.deleted', async function () {
+ await servers[0].users.remove({ userId })
+
+ await checkHook('action:api.user.deleted')
+ })