diff options
Diffstat (limited to 'server/tests/plugins/filter-hooks.ts')
-rw-r--r-- | server/tests/plugins/filter-hooks.ts | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/server/tests/plugins/filter-hooks.ts b/server/tests/plugins/filter-hooks.ts index 4d354b68e..9939b8e6e 100644 --- a/server/tests/plugins/filter-hooks.ts +++ b/server/tests/plugins/filter-hooks.ts | |||
@@ -6,6 +6,7 @@ import { ServerConfig } from '@shared/models' | |||
6 | import { | 6 | import { |
7 | addVideoCommentReply, | 7 | addVideoCommentReply, |
8 | addVideoCommentThread, | 8 | addVideoCommentThread, |
9 | createLive, | ||
9 | doubleFollow, | 10 | doubleFollow, |
10 | getConfig, | 11 | getConfig, |
11 | getPluginTestPath, | 12 | getPluginTestPath, |
@@ -19,6 +20,7 @@ import { | |||
19 | registerUser, | 20 | registerUser, |
20 | setAccessTokensToServers, | 21 | setAccessTokensToServers, |
21 | setDefaultVideoChannel, | 22 | setDefaultVideoChannel, |
23 | updateCustomSubConfig, | ||
22 | updateVideo, | 24 | updateVideo, |
23 | uploadVideo, | 25 | uploadVideo, |
24 | waitJobs | 26 | waitJobs |
@@ -61,6 +63,17 @@ describe('Test plugin filter hooks', function () { | |||
61 | 63 | ||
62 | const res = await getVideosList(servers[0].url) | 64 | const res = await getVideosList(servers[0].url) |
63 | videoUUID = res.body.data[0].uuid | 65 | videoUUID = res.body.data[0].uuid |
66 | |||
67 | await updateCustomSubConfig(servers[0].url, servers[0].accessToken, { | ||
68 | live: { enabled: true }, | ||
69 | signup: { enabled: true }, | ||
70 | import: { | ||
71 | videos: { | ||
72 | http: { enabled: true }, | ||
73 | torrent: { enabled: true } | ||
74 | } | ||
75 | } | ||
76 | }) | ||
64 | }) | 77 | }) |
65 | 78 | ||
66 | it('Should run filter:api.videos.list.params', async function () { | 79 | it('Should run filter:api.videos.list.params', async function () { |
@@ -87,6 +100,16 @@ describe('Test plugin filter hooks', function () { | |||
87 | await uploadVideo(servers[0].url, servers[0].accessToken, { name: 'video with bad word' }, 403) | 100 | await uploadVideo(servers[0].url, servers[0].accessToken, { name: 'video with bad word' }, 403) |
88 | }) | 101 | }) |
89 | 102 | ||
103 | it('Should run filter:api.live-video.create.accept.result', async function () { | ||
104 | const attributes = { | ||
105 | name: 'video with bad word', | ||
106 | privacy: VideoPrivacy.PUBLIC, | ||
107 | channelId: servers[0].videoChannel.id | ||
108 | } | ||
109 | |||
110 | await createLive(servers[0].url, servers[0].accessToken, attributes, 403) | ||
111 | }) | ||
112 | |||
90 | it('Should run filter:api.video.pre-import-url.accept.result', async function () { | 113 | it('Should run filter:api.video.pre-import-url.accept.result', async function () { |
91 | const baseAttributes = { | 114 | const baseAttributes = { |
92 | name: 'normal title', | 115 | name: 'normal title', |