aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
authorLucas Declercq <lucas.declercq@ineat-conseil.fr>2018-10-08 14:45:22 +0200
committerLucas Declercq <lucas.declercq@ineat-conseil.fr>2018-10-08 14:45:22 +0200
commit7f2cfe3a792856f7de6f1d13688aa3d06ec1bf70 (patch)
tree8042222877ed6dc983ff0e13ea3ec56aa1a4386a /server/tests
parent4ffdcfc63b8c804a0aea20609544c859ab57318b (diff)
downloadPeerTube-7f2cfe3a792856f7de6f1d13688aa3d06ec1bf70.tar.gz
PeerTube-7f2cfe3a792856f7de6f1d13688aa3d06ec1bf70.tar.zst
PeerTube-7f2cfe3a792856f7de6f1d13688aa3d06ec1bf70.zip
Rename downloadingEnabled property to downloadEnabled
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/check-params/video-imports.ts2
-rw-r--r--server/tests/api/check-params/videos.ts4
-rw-r--r--server/tests/api/server/follows.ts2
-rw-r--r--server/tests/api/server/handle-down.ts2
-rw-r--r--server/tests/api/videos/multiple-servers.ts12
-rw-r--r--server/tests/api/videos/single-server.ts6
-rw-r--r--server/tests/utils/videos/videos.ts12
7 files changed, 20 insertions, 20 deletions
diff --git a/server/tests/api/check-params/video-imports.ts b/server/tests/api/check-params/video-imports.ts
index 8dd87b8ae..1ffb81a38 100644
--- a/server/tests/api/check-params/video-imports.ts
+++ b/server/tests/api/check-params/video-imports.ts
@@ -84,7 +84,7 @@ describe('Test video imports API validator', function () {
84 language: 'pt', 84 language: 'pt',
85 nsfw: false, 85 nsfw: false,
86 commentsEnabled: true, 86 commentsEnabled: true,
87 downloadingEnabled: true, 87 downloadEnabled: true,
88 waitTranscoding: true, 88 waitTranscoding: true,
89 description: 'my super description', 89 description: 'my super description',
90 support: 'my super support text', 90 support: 'my super support text',
diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts
index c5740087c..bc28e2422 100644
--- a/server/tests/api/check-params/videos.ts
+++ b/server/tests/api/check-params/videos.ts
@@ -175,7 +175,7 @@ describe('Test videos API validator', function () {
175 language: 'pt', 175 language: 'pt',
176 nsfw: false, 176 nsfw: false,
177 commentsEnabled: true, 177 commentsEnabled: true,
178 downloadingEnabled: true, 178 downloadEnabled: true,
179 waitTranscoding: true, 179 waitTranscoding: true,
180 description: 'my super description', 180 description: 'my super description',
181 support: 'my super support text', 181 support: 'my super support text',
@@ -420,7 +420,7 @@ describe('Test videos API validator', function () {
420 language: 'pt', 420 language: 'pt',
421 nsfw: false, 421 nsfw: false,
422 commentsEnabled: false, 422 commentsEnabled: false,
423 downloadingEnabled: false, 423 downloadEnabled: false,
424 description: 'my super description', 424 description: 'my super description',
425 privacy: VideoPrivacy.PUBLIC, 425 privacy: VideoPrivacy.PUBLIC,
426 tags: [ 'tag1', 'tag2' ] 426 tags: [ 'tag1', 'tag2' ]
diff --git a/server/tests/api/server/follows.ts b/server/tests/api/server/follows.ts
index 5cad1d09d..e8914a9d4 100644
--- a/server/tests/api/server/follows.ts
+++ b/server/tests/api/server/follows.ts
@@ -305,7 +305,7 @@ describe('Test follows', function () {
305 }, 305 },
306 isLocal, 306 isLocal,
307 commentsEnabled: true, 307 commentsEnabled: true,
308 downloadingEnabled: true, 308 downloadEnabled: true,
309 duration: 5, 309 duration: 5,
310 tags: [ 'tag1', 'tag2', 'tag3' ], 310 tags: [ 'tag1', 'tag2', 'tag3' ],
311 privacy: VideoPrivacy.PUBLIC, 311 privacy: VideoPrivacy.PUBLIC,
diff --git a/server/tests/api/server/handle-down.ts b/server/tests/api/server/handle-down.ts
index 971de4607..b0a3d029a 100644
--- a/server/tests/api/server/handle-down.ts
+++ b/server/tests/api/server/handle-down.ts
@@ -70,7 +70,7 @@ describe('Test handle downs', function () {
70 tags: [ 'tag1p1', 'tag2p1' ], 70 tags: [ 'tag1p1', 'tag2p1' ],
71 privacy: VideoPrivacy.PUBLIC, 71 privacy: VideoPrivacy.PUBLIC,
72 commentsEnabled: true, 72 commentsEnabled: true,
73 downloadingEnabled: true, 73 downloadEnabled: true,
74 channel: { 74 channel: {
75 name: 'root_channel', 75 name: 'root_channel',
76 displayName: 'Main root channel', 76 displayName: 'Main root channel',
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts
index 83e391ccd..256be5d1c 100644
--- a/server/tests/api/videos/multiple-servers.ts
+++ b/server/tests/api/videos/multiple-servers.ts
@@ -127,7 +127,7 @@ describe('Test multiple servers', function () {
127 tags: [ 'tag1p1', 'tag2p1' ], 127 tags: [ 'tag1p1', 'tag2p1' ],
128 privacy: VideoPrivacy.PUBLIC, 128 privacy: VideoPrivacy.PUBLIC,
129 commentsEnabled: true, 129 commentsEnabled: true,
130 downloadingEnabled: true, 130 downloadEnabled: true,
131 channel: { 131 channel: {
132 displayName: 'my channel', 132 displayName: 'my channel',
133 name: 'super_channel_name', 133 name: 'super_channel_name',
@@ -199,7 +199,7 @@ describe('Test multiple servers', function () {
199 }, 199 },
200 isLocal, 200 isLocal,
201 commentsEnabled: true, 201 commentsEnabled: true,
202 downloadingEnabled: true, 202 downloadEnabled: true,
203 duration: 5, 203 duration: 5,
204 tags: [ 'tag1p2', 'tag2p2', 'tag3p2' ], 204 tags: [ 'tag1p2', 'tag2p2', 'tag3p2' ],
205 privacy: VideoPrivacy.PUBLIC, 205 privacy: VideoPrivacy.PUBLIC,
@@ -308,7 +308,7 @@ describe('Test multiple servers', function () {
308 isLocal, 308 isLocal,
309 duration: 5, 309 duration: 5,
310 commentsEnabled: true, 310 commentsEnabled: true,
311 downloadingEnabled: true, 311 downloadEnabled: true,
312 tags: [ 'tag1p3' ], 312 tags: [ 'tag1p3' ],
313 privacy: VideoPrivacy.PUBLIC, 313 privacy: VideoPrivacy.PUBLIC,
314 channel: { 314 channel: {
@@ -340,7 +340,7 @@ describe('Test multiple servers', function () {
340 host: 'localhost:9003' 340 host: 'localhost:9003'
341 }, 341 },
342 commentsEnabled: true, 342 commentsEnabled: true,
343 downloadingEnabled: true, 343 downloadEnabled: true,
344 isLocal, 344 isLocal,
345 duration: 5, 345 duration: 5,
346 tags: [ 'tag2p3', 'tag3p3', 'tag4p3' ], 346 tags: [ 'tag2p3', 'tag3p3', 'tag4p3' ],
@@ -658,7 +658,7 @@ describe('Test multiple servers', function () {
658 isLocal, 658 isLocal,
659 duration: 5, 659 duration: 5,
660 commentsEnabled: true, 660 commentsEnabled: true,
661 downloadingEnabled: true, 661 downloadEnabled: true,
662 tags: [ 'tag_up_1', 'tag_up_2' ], 662 tags: [ 'tag_up_1', 'tag_up_2' ],
663 privacy: VideoPrivacy.PUBLIC, 663 privacy: VideoPrivacy.PUBLIC,
664 channel: { 664 channel: {
@@ -980,7 +980,7 @@ describe('Test multiple servers', function () {
980 isLocal, 980 isLocal,
981 duration: 5, 981 duration: 5,
982 commentsEnabled: false, 982 commentsEnabled: false,
983 downloadingEnabled: false, 983 downloadEnabled: false,
984 tags: [ ], 984 tags: [ ],
985 privacy: VideoPrivacy.PUBLIC, 985 privacy: VideoPrivacy.PUBLIC,
986 channel: { 986 channel: {
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts
index 8995a8525..92d42eb80 100644
--- a/server/tests/api/videos/single-server.ts
+++ b/server/tests/api/videos/single-server.ts
@@ -55,7 +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 downloadingEnabled: true, 58 downloadEnabled: true,
59 channel: { 59 channel: {
60 displayName: 'Main root channel', 60 displayName: 'Main root channel',
61 name: 'root_channel', 61 name: 'root_channel',
@@ -88,7 +88,7 @@ describe('Test a single server', function () {
88 privacy: VideoPrivacy.PUBLIC, 88 privacy: VideoPrivacy.PUBLIC,
89 duration: 5, 89 duration: 5,
90 commentsEnabled: false, 90 commentsEnabled: false,
91 downloadingEnabled: false, 91 downloadEnabled: false,
92 channel: { 92 channel: {
93 name: 'root_channel', 93 name: 'root_channel',
94 displayName: 'Main root channel', 94 displayName: 'Main root channel',
@@ -358,7 +358,7 @@ describe('Test a single server', function () {
358 nsfw: false, 358 nsfw: false,
359 description: 'my super description updated', 359 description: 'my super description updated',
360 commentsEnabled: false, 360 commentsEnabled: false,
361 downloadingEnabled: false, 361 downloadEnabled: false,
362 tags: [ 'tagup1', 'tagup2' ] 362 tags: [ 'tagup1', 'tagup2' ]
363 } 363 }
364 await updateVideo(server.url, server.accessToken, videoId, attributes) 364 await updateVideo(server.url, server.accessToken, videoId, attributes)
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts
index a7fd4c8a6..bc878b039 100644
--- a/server/tests/utils/videos/videos.ts
+++ b/server/tests/utils/videos/videos.ts
@@ -27,7 +27,7 @@ type VideoAttributes = {
27 language?: string 27 language?: string
28 nsfw?: boolean 28 nsfw?: boolean
29 commentsEnabled?: boolean 29 commentsEnabled?: boolean
30 downloadingEnabled?: boolean 30 downloadEnabled?: boolean
31 waitTranscoding?: boolean 31 waitTranscoding?: boolean
32 description?: string 32 description?: string
33 tags?: string[] 33 tags?: string[]
@@ -311,7 +311,7 @@ async function uploadVideo (url: string, accessToken: string, videoAttributesArg
311 tags: [ 'tag' ], 311 tags: [ 'tag' ],
312 privacy: VideoPrivacy.PUBLIC, 312 privacy: VideoPrivacy.PUBLIC,
313 commentsEnabled: true, 313 commentsEnabled: true,
314 downloadingEnabled: true, 314 downloadEnabled: true,
315 fixture: 'video_short.webm' 315 fixture: 'video_short.webm'
316 }, videoAttributesArg) 316 }, videoAttributesArg)
317 317
@@ -322,7 +322,7 @@ async function uploadVideo (url: string, accessToken: string, videoAttributesArg
322 .field('name', attributes.name) 322 .field('name', attributes.name)
323 .field('nsfw', JSON.stringify(attributes.nsfw)) 323 .field('nsfw', JSON.stringify(attributes.nsfw))
324 .field('commentsEnabled', JSON.stringify(attributes.commentsEnabled)) 324 .field('commentsEnabled', JSON.stringify(attributes.commentsEnabled))
325 .field('downloadingEnabled', JSON.stringify(attributes.downloadingEnabled)) 325 .field('downloadEnabled', JSON.stringify(attributes.downloadEnabled))
326 .field('waitTranscoding', JSON.stringify(attributes.waitTranscoding)) 326 .field('waitTranscoding', JSON.stringify(attributes.waitTranscoding))
327 .field('privacy', attributes.privacy.toString()) 327 .field('privacy', attributes.privacy.toString())
328 .field('channelId', attributes.channelId) 328 .field('channelId', attributes.channelId)
@@ -373,7 +373,7 @@ function updateVideo (url: string, accessToken: string, id: number | string, att
373 if (attributes.language) body['language'] = attributes.language 373 if (attributes.language) body['language'] = attributes.language
374 if (attributes.nsfw !== undefined) body['nsfw'] = JSON.stringify(attributes.nsfw) 374 if (attributes.nsfw !== undefined) body['nsfw'] = JSON.stringify(attributes.nsfw)
375 if (attributes.commentsEnabled !== undefined) body['commentsEnabled'] = JSON.stringify(attributes.commentsEnabled) 375 if (attributes.commentsEnabled !== undefined) body['commentsEnabled'] = JSON.stringify(attributes.commentsEnabled)
376 if (attributes.downloadingEnabled !== undefined) body['downloadingEnabled'] = JSON.stringify(attributes.downloadingEnabled) 376 if (attributes.downloadEnabled !== undefined) body['downloadEnabled'] = JSON.stringify(attributes.downloadEnabled)
377 if (attributes.description) body['description'] = attributes.description 377 if (attributes.description) body['description'] = attributes.description
378 if (attributes.tags) body['tags'] = attributes.tags 378 if (attributes.tags) body['tags'] = attributes.tags
379 if (attributes.privacy) body['privacy'] = attributes.privacy 379 if (attributes.privacy) body['privacy'] = attributes.privacy
@@ -439,7 +439,7 @@ async function completeVideoCheck (
439 language: string 439 language: string
440 nsfw: boolean 440 nsfw: boolean
441 commentsEnabled: boolean 441 commentsEnabled: boolean
442 downloadingEnabled: boolean 442 downloadEnabled: boolean
443 description: string 443 description: string
444 publishedAt?: string 444 publishedAt?: string
445 support: string 445 support: string
@@ -514,7 +514,7 @@ async function completeVideoCheck (
514 expect(dateIsValid(videoDetails.channel.createdAt.toString())).to.be.true 514 expect(dateIsValid(videoDetails.channel.createdAt.toString())).to.be.true
515 expect(dateIsValid(videoDetails.channel.updatedAt.toString())).to.be.true 515 expect(dateIsValid(videoDetails.channel.updatedAt.toString())).to.be.true
516 expect(videoDetails.commentsEnabled).to.equal(attributes.commentsEnabled) 516 expect(videoDetails.commentsEnabled).to.equal(attributes.commentsEnabled)
517 expect(videoDetails.downloadingEnabled).to.equal(attributes.downloadingEnabled) 517 expect(videoDetails.downloadEnabled).to.equal(attributes.downloadEnabled)
518 518
519 for (const attributeFile of attributes.files) { 519 for (const attributeFile of attributes.files) {
520 const file = videoDetails.files.find(f => f.resolution.id === attributeFile.resolution) 520 const file = videoDetails.files.find(f => f.resolution.id === attributeFile.resolution)