diff options
Diffstat (limited to 'server/tests/utils/videos')
-rw-r--r-- | server/tests/utils/videos/videos.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts index 5e186147e..943c85cc7 100644 --- a/server/tests/utils/videos/videos.ts +++ b/server/tests/utils/videos/videos.ts | |||
@@ -24,7 +24,7 @@ type VideoAttributes = { | |||
24 | name?: string | 24 | name?: string |
25 | category?: number | 25 | category?: number |
26 | licence?: number | 26 | licence?: number |
27 | language?: number | 27 | language?: string |
28 | nsfw?: boolean | 28 | nsfw?: boolean |
29 | commentsEnabled?: boolean | 29 | commentsEnabled?: boolean |
30 | description?: string | 30 | description?: string |
@@ -284,7 +284,7 @@ async function uploadVideo (url: string, accessToken: string, videoAttributesArg | |||
284 | name: 'my super video', | 284 | name: 'my super video', |
285 | category: 5, | 285 | category: 5, |
286 | licence: 4, | 286 | licence: 4, |
287 | language: 3, | 287 | language: 'zh', |
288 | channelId: defaultChannelId, | 288 | channelId: defaultChannelId, |
289 | nsfw: true, | 289 | nsfw: true, |
290 | description: 'my super description', | 290 | description: 'my super description', |
@@ -403,7 +403,7 @@ async function completeVideoCheck ( | |||
403 | name: string | 403 | name: string |
404 | category: number | 404 | category: number |
405 | licence: number | 405 | licence: number |
406 | language: number | 406 | language: string |
407 | nsfw: boolean | 407 | nsfw: boolean |
408 | commentsEnabled: boolean | 408 | commentsEnabled: boolean |
409 | description: string | 409 | description: string |
@@ -437,11 +437,11 @@ async function completeVideoCheck ( | |||
437 | 437 | ||
438 | expect(video.name).to.equal(attributes.name) | 438 | expect(video.name).to.equal(attributes.name) |
439 | expect(video.category.id).to.equal(attributes.category) | 439 | expect(video.category.id).to.equal(attributes.category) |
440 | expect(video.category.label).to.equal(VIDEO_CATEGORIES[attributes.category] || 'Misc') | 440 | expect(video.category.label).to.equal(attributes.category !== null ? VIDEO_CATEGORIES[attributes.category] : 'Misc') |
441 | expect(video.licence.id).to.equal(attributes.licence) | 441 | expect(video.licence.id).to.equal(attributes.licence) |
442 | expect(video.licence.label).to.equal(VIDEO_LICENCES[attributes.licence] || 'Unknown') | 442 | expect(video.licence.label).to.equal(attributes.licence !== null ? VIDEO_LICENCES[attributes.licence] : 'Unknown') |
443 | expect(video.language.id).to.equal(attributes.language) | 443 | expect(video.language.id).to.equal(attributes.language) |
444 | expect(video.language.label).to.equal(VIDEO_LANGUAGES[attributes.language] || 'Unknown') | 444 | expect(video.language.label).to.equal(attributes.language !== null ? VIDEO_LANGUAGES[attributes.language] : 'Unknown') |
445 | expect(video.privacy.id).to.deep.equal(attributes.privacy) | 445 | expect(video.privacy.id).to.deep.equal(attributes.privacy) |
446 | expect(video.privacy.label).to.deep.equal(VIDEO_PRIVACIES[attributes.privacy]) | 446 | expect(video.privacy.label).to.deep.equal(VIDEO_PRIVACIES[attributes.privacy]) |
447 | expect(video.nsfw).to.equal(attributes.nsfw) | 447 | expect(video.nsfw).to.equal(attributes.nsfw) |