diff options
Diffstat (limited to 'server/tests/api')
-rw-r--r-- | server/tests/api/check-params/video-imports.ts | 1 | ||||
-rw-r--r-- | server/tests/api/check-params/videos.ts | 2 | ||||
-rw-r--r-- | server/tests/api/server/follows.ts | 1 | ||||
-rw-r--r-- | server/tests/api/server/handle-down.ts | 1 | ||||
-rw-r--r-- | server/tests/api/videos/multiple-servers.ts | 12 | ||||
-rw-r--r-- | server/tests/api/videos/single-server.ts | 3 |
6 files changed, 18 insertions, 2 deletions
diff --git a/server/tests/api/check-params/video-imports.ts b/server/tests/api/check-params/video-imports.ts index 7bf187007..6dd9f15f7 100644 --- a/server/tests/api/check-params/video-imports.ts +++ b/server/tests/api/check-params/video-imports.ts | |||
@@ -88,6 +88,7 @@ describe('Test video imports API validator', function () { | |||
88 | language: 'pt', | 88 | language: 'pt', |
89 | nsfw: false, | 89 | nsfw: false, |
90 | commentsEnabled: true, | 90 | commentsEnabled: true, |
91 | downloadEnabled: true, | ||
91 | waitTranscoding: true, | 92 | waitTranscoding: true, |
92 | description: 'my super description', | 93 | description: 'my super description', |
93 | support: 'my super support text', | 94 | support: 'my super support text', |
diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts index f26b91435..878ffe025 100644 --- a/server/tests/api/check-params/videos.ts +++ b/server/tests/api/check-params/videos.ts | |||
@@ -179,6 +179,7 @@ describe('Test videos API validator', function () { | |||
179 | language: 'pt', | 179 | language: 'pt', |
180 | nsfw: false, | 180 | nsfw: false, |
181 | commentsEnabled: true, | 181 | commentsEnabled: true, |
182 | downloadEnabled: true, | ||
182 | waitTranscoding: true, | 183 | waitTranscoding: true, |
183 | description: 'my super description', | 184 | description: 'my super description', |
184 | support: 'my super support text', | 185 | support: 'my super support text', |
@@ -428,6 +429,7 @@ describe('Test videos API validator', function () { | |||
428 | language: 'pt', | 429 | language: 'pt', |
429 | nsfw: false, | 430 | nsfw: false, |
430 | commentsEnabled: false, | 431 | commentsEnabled: false, |
432 | downloadEnabled: false, | ||
431 | description: 'my super description', | 433 | description: 'my super description', |
432 | privacy: VideoPrivacy.PUBLIC, | 434 | privacy: VideoPrivacy.PUBLIC, |
433 | tags: [ 'tag1', 'tag2' ] | 435 | tags: [ 'tag1', 'tag2' ] |
diff --git a/server/tests/api/server/follows.ts b/server/tests/api/server/follows.ts index b0fc5d293..ad4c87c73 100644 --- a/server/tests/api/server/follows.ts +++ b/server/tests/api/server/follows.ts | |||
@@ -348,6 +348,7 @@ describe('Test follows', function () { | |||
348 | }, | 348 | }, |
349 | isLocal, | 349 | isLocal, |
350 | commentsEnabled: true, | 350 | commentsEnabled: true, |
351 | downloadEnabled: true, | ||
351 | duration: 5, | 352 | duration: 5, |
352 | tags: [ 'tag1', 'tag2', 'tag3' ], | 353 | tags: [ 'tag1', 'tag2', 'tag3' ], |
353 | privacy: VideoPrivacy.PUBLIC, | 354 | privacy: VideoPrivacy.PUBLIC, |
diff --git a/server/tests/api/server/handle-down.ts b/server/tests/api/server/handle-down.ts index cd7baadad..cd5acbe16 100644 --- a/server/tests/api/server/handle-down.ts +++ b/server/tests/api/server/handle-down.ts | |||
@@ -76,6 +76,7 @@ describe('Test handle downs', function () { | |||
76 | tags: [ 'tag1p1', 'tag2p1' ], | 76 | tags: [ 'tag1p1', 'tag2p1' ], |
77 | privacy: VideoPrivacy.PUBLIC, | 77 | privacy: VideoPrivacy.PUBLIC, |
78 | commentsEnabled: true, | 78 | commentsEnabled: true, |
79 | downloadEnabled: true, | ||
79 | channel: { | 80 | channel: { |
80 | name: 'root_channel', | 81 | name: 'root_channel', |
81 | displayName: 'Main root channel', | 82 | displayName: 'Main root channel', |
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index 6c281e49e..1b471ba79 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts | |||
@@ -128,6 +128,7 @@ describe('Test multiple servers', function () { | |||
128 | tags: [ 'tag1p1', 'tag2p1' ], | 128 | tags: [ 'tag1p1', 'tag2p1' ], |
129 | privacy: VideoPrivacy.PUBLIC, | 129 | privacy: VideoPrivacy.PUBLIC, |
130 | commentsEnabled: true, | 130 | commentsEnabled: true, |
131 | downloadEnabled: true, | ||
131 | channel: { | 132 | channel: { |
132 | displayName: 'my channel', | 133 | displayName: 'my channel', |
133 | name: 'super_channel_name', | 134 | name: 'super_channel_name', |
@@ -199,6 +200,7 @@ describe('Test multiple servers', function () { | |||
199 | }, | 200 | }, |
200 | isLocal, | 201 | isLocal, |
201 | commentsEnabled: true, | 202 | commentsEnabled: true, |
203 | downloadEnabled: true, | ||
202 | duration: 5, | 204 | duration: 5, |
203 | tags: [ 'tag1p2', 'tag2p2', 'tag3p2' ], | 205 | tags: [ 'tag1p2', 'tag2p2', 'tag3p2' ], |
204 | privacy: VideoPrivacy.PUBLIC, | 206 | privacy: VideoPrivacy.PUBLIC, |
@@ -307,6 +309,7 @@ describe('Test multiple servers', function () { | |||
307 | isLocal, | 309 | isLocal, |
308 | duration: 5, | 310 | duration: 5, |
309 | commentsEnabled: true, | 311 | commentsEnabled: true, |
312 | downloadEnabled: true, | ||
310 | tags: [ 'tag1p3' ], | 313 | tags: [ 'tag1p3' ], |
311 | privacy: VideoPrivacy.PUBLIC, | 314 | privacy: VideoPrivacy.PUBLIC, |
312 | channel: { | 315 | channel: { |
@@ -338,6 +341,7 @@ describe('Test multiple servers', function () { | |||
338 | host: 'localhost:9003' | 341 | host: 'localhost:9003' |
339 | }, | 342 | }, |
340 | commentsEnabled: true, | 343 | commentsEnabled: true, |
344 | downloadEnabled: true, | ||
341 | isLocal, | 345 | isLocal, |
342 | duration: 5, | 346 | duration: 5, |
343 | tags: [ 'tag2p3', 'tag3p3', 'tag4p3' ], | 347 | tags: [ 'tag2p3', 'tag3p3', 'tag4p3' ], |
@@ -655,6 +659,7 @@ describe('Test multiple servers', function () { | |||
655 | isLocal, | 659 | isLocal, |
656 | duration: 5, | 660 | duration: 5, |
657 | commentsEnabled: true, | 661 | commentsEnabled: true, |
662 | downloadEnabled: true, | ||
658 | tags: [ 'tag_up_1', 'tag_up_2' ], | 663 | tags: [ 'tag_up_1', 'tag_up_2' ], |
659 | privacy: VideoPrivacy.PUBLIC, | 664 | privacy: VideoPrivacy.PUBLIC, |
660 | channel: { | 665 | channel: { |
@@ -914,11 +919,12 @@ describe('Test multiple servers', function () { | |||
914 | } | 919 | } |
915 | }) | 920 | }) |
916 | 921 | ||
917 | it('Should disable comments', async function () { | 922 | it('Should disable comments and download', async function () { |
918 | this.timeout(20000) | 923 | this.timeout(20000) |
919 | 924 | ||
920 | const attributes = { | 925 | const attributes = { |
921 | commentsEnabled: false | 926 | commentsEnabled: false, |
927 | downloadEnabled: false | ||
922 | } | 928 | } |
923 | 929 | ||
924 | await updateVideo(servers[0].url, servers[0].accessToken, videoUUID, attributes) | 930 | await updateVideo(servers[0].url, servers[0].accessToken, videoUUID, attributes) |
@@ -928,6 +934,7 @@ describe('Test multiple servers', function () { | |||
928 | for (const server of servers) { | 934 | for (const server of servers) { |
929 | const res = await getVideo(server.url, videoUUID) | 935 | const res = await getVideo(server.url, videoUUID) |
930 | expect(res.body.commentsEnabled).to.be.false | 936 | expect(res.body.commentsEnabled).to.be.false |
937 | expect(res.body.downloadEnabled).to.be.false | ||
931 | 938 | ||
932 | const text = 'my super forbidden comment' | 939 | const text = 'my super forbidden comment' |
933 | await addVideoCommentThread(server.url, server.accessToken, videoUUID, text, 409) | 940 | await addVideoCommentThread(server.url, server.accessToken, videoUUID, text, 409) |
@@ -976,6 +983,7 @@ describe('Test multiple servers', function () { | |||
976 | isLocal, | 983 | isLocal, |
977 | duration: 5, | 984 | duration: 5, |
978 | commentsEnabled: false, | 985 | commentsEnabled: false, |
986 | downloadEnabled: false, | ||
979 | tags: [ ], | 987 | tags: [ ], |
980 | privacy: VideoPrivacy.PUBLIC, | 988 | privacy: VideoPrivacy.PUBLIC, |
981 | channel: { | 989 | channel: { |
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts index 069dec67c..cfdcbaf3f 100644 --- a/server/tests/api/videos/single-server.ts +++ b/server/tests/api/videos/single-server.ts | |||
@@ -55,6 +55,7 @@ describe('Test a single server', function () { | |||
55 | tags: [ 'tag1', 'tag2', 'tag3' ], | 55 | tags: [ 'tag1', 'tag2', 'tag3' ], |
56 | privacy: VideoPrivacy.PUBLIC, | 56 | privacy: VideoPrivacy.PUBLIC, |
57 | commentsEnabled: true, | 57 | commentsEnabled: true, |
58 | downloadEnabled: true, | ||
58 | channel: { | 59 | channel: { |
59 | displayName: 'Main root channel', | 60 | displayName: 'Main root channel', |
60 | name: 'root_channel', | 61 | name: 'root_channel', |
@@ -87,6 +88,7 @@ describe('Test a single server', function () { | |||
87 | privacy: VideoPrivacy.PUBLIC, | 88 | privacy: VideoPrivacy.PUBLIC, |
88 | duration: 5, | 89 | duration: 5, |
89 | commentsEnabled: false, | 90 | commentsEnabled: false, |
91 | downloadEnabled: false, | ||
90 | channel: { | 92 | channel: { |
91 | name: 'root_channel', | 93 | name: 'root_channel', |
92 | displayName: 'Main root channel', | 94 | displayName: 'Main root channel', |
@@ -356,6 +358,7 @@ describe('Test a single server', function () { | |||
356 | nsfw: false, | 358 | nsfw: false, |
357 | description: 'my super description updated', | 359 | description: 'my super description updated', |
358 | commentsEnabled: false, | 360 | commentsEnabled: false, |
361 | downloadEnabled: false, | ||
359 | tags: [ 'tagup1', 'tagup2' ] | 362 | tags: [ 'tagup1', 'tagup2' ] |
360 | } | 363 | } |
361 | await updateVideo(server.url, server.accessToken, videoId, attributes) | 364 | await updateVideo(server.url, server.accessToken, videoId, attributes) |