diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-23 14:39:52 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-23 14:39:52 +0200 |
commit | 9d3ef9fe052ed29bd67566754cb28662bd122234 (patch) | |
tree | 7b704dbc0b2c8b4ca18bef2409d640d0019c3d0a /server/tests/utils/videos/videos.ts | |
parent | 2a2c19dfef7a9aa313c6ca0798f271c9a63449a9 (diff) | |
download | PeerTube-9d3ef9fe052ed29bd67566754cb28662bd122234.tar.gz PeerTube-9d3ef9fe052ed29bd67566754cb28662bd122234.tar.zst PeerTube-9d3ef9fe052ed29bd67566754cb28662bd122234.zip |
Use ISO 639 for languages
Diffstat (limited to 'server/tests/utils/videos/videos.ts')
-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) |