- it('Should run action:api.video.updated', async function () {
- await updateVideo(servers[0].url, servers[0].accessToken, videoUUID, { name: 'video updated' })
+ describe('Live hooks', function () {
+
+ it('Should run action:api.live-video.created', async function () {
+ const attributes = {
+ name: 'live',
+ privacy: VideoPrivacy.PUBLIC,
+ channelId: servers[0].store.channel.id
+ }
+
+ await servers[0].live.create({ fields: attributes })
+
+ await checkHook('action:api.live-video.created')
+ })
+ })
+
+ describe('Comments hooks', function () {
+ it('Should run action:api.video-thread.created', async function () {
+ const created = await servers[0].comments.createThread({ videoId: videoUUID, text: 'thread' })
+ threadId = created.id
+
+ await checkHook('action:api.video-thread.created')
+ })
+
+ it('Should run action:api.video-comment-reply.created', async function () {
+ await servers[0].comments.addReply({ videoId: videoUUID, toCommentId: threadId, text: 'reply' })
+
+ await checkHook('action:api.video-comment-reply.created')
+ })
+
+ it('Should run action:api.video-comment.deleted', async function () {
+ await servers[0].comments.delete({ videoId: videoUUID, commentId: threadId })