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/api/videos | |
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/api/videos')
-rw-r--r-- | server/tests/api/videos/multiple-servers.ts | 20 | ||||
-rw-r--r-- | server/tests/api/videos/single-server.ts | 14 |
2 files changed, 17 insertions, 17 deletions
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index e31c7febd..2563939ec 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts | |||
@@ -89,7 +89,7 @@ describe('Test multiple servers', function () { | |||
89 | name: 'my super name for server 1', | 89 | name: 'my super name for server 1', |
90 | category: 5, | 90 | category: 5, |
91 | licence: 4, | 91 | licence: 4, |
92 | language: 9, | 92 | language: 'ja', |
93 | nsfw: true, | 93 | nsfw: true, |
94 | description: 'my super description for server 1', | 94 | description: 'my super description for server 1', |
95 | support: 'my super support text for server 1', | 95 | support: 'my super support text for server 1', |
@@ -108,7 +108,7 @@ describe('Test multiple servers', function () { | |||
108 | name: 'my super name for server 1', | 108 | name: 'my super name for server 1', |
109 | category: 5, | 109 | category: 5, |
110 | licence: 4, | 110 | licence: 4, |
111 | language: 9, | 111 | language: 'ja', |
112 | nsfw: true, | 112 | nsfw: true, |
113 | description: 'my super description for server 1', | 113 | description: 'my super description for server 1', |
114 | support: 'my super support text for server 1', | 114 | support: 'my super support text for server 1', |
@@ -159,7 +159,7 @@ describe('Test multiple servers', function () { | |||
159 | name: 'my super name for server 2', | 159 | name: 'my super name for server 2', |
160 | category: 4, | 160 | category: 4, |
161 | licence: 3, | 161 | licence: 3, |
162 | language: 11, | 162 | language: 'de', |
163 | nsfw: true, | 163 | nsfw: true, |
164 | description: 'my super description for server 2', | 164 | description: 'my super description for server 2', |
165 | support: 'my super support text for server 2', | 165 | support: 'my super support text for server 2', |
@@ -180,7 +180,7 @@ describe('Test multiple servers', function () { | |||
180 | name: 'my super name for server 2', | 180 | name: 'my super name for server 2', |
181 | category: 4, | 181 | category: 4, |
182 | licence: 3, | 182 | licence: 3, |
183 | language: 11, | 183 | language: 'de', |
184 | nsfw: true, | 184 | nsfw: true, |
185 | description: 'my super description for server 2', | 185 | description: 'my super description for server 2', |
186 | support: 'my super support text for server 2', | 186 | support: 'my super support text for server 2', |
@@ -238,7 +238,7 @@ describe('Test multiple servers', function () { | |||
238 | name: 'my super name for server 3', | 238 | name: 'my super name for server 3', |
239 | category: 6, | 239 | category: 6, |
240 | licence: 5, | 240 | licence: 5, |
241 | language: 11, | 241 | language: 'de', |
242 | nsfw: true, | 242 | nsfw: true, |
243 | description: 'my super description for server 3', | 243 | description: 'my super description for server 3', |
244 | support: 'my super support text for server 3', | 244 | support: 'my super support text for server 3', |
@@ -251,7 +251,7 @@ describe('Test multiple servers', function () { | |||
251 | name: 'my super name for server 3-2', | 251 | name: 'my super name for server 3-2', |
252 | category: 7, | 252 | category: 7, |
253 | licence: 6, | 253 | licence: 6, |
254 | language: 12, | 254 | language: 'ko', |
255 | nsfw: false, | 255 | nsfw: false, |
256 | description: 'my super description for server 3-2', | 256 | description: 'my super description for server 3-2', |
257 | support: 'my super support text for server 3-2', | 257 | support: 'my super support text for server 3-2', |
@@ -286,7 +286,7 @@ describe('Test multiple servers', function () { | |||
286 | name: 'my super name for server 3', | 286 | name: 'my super name for server 3', |
287 | category: 6, | 287 | category: 6, |
288 | licence: 5, | 288 | licence: 5, |
289 | language: 11, | 289 | language: 'de', |
290 | nsfw: true, | 290 | nsfw: true, |
291 | description: 'my super description for server 3', | 291 | description: 'my super description for server 3', |
292 | support: 'my super support text for server 3', | 292 | support: 'my super support text for server 3', |
@@ -318,7 +318,7 @@ describe('Test multiple servers', function () { | |||
318 | name: 'my super name for server 3-2', | 318 | name: 'my super name for server 3-2', |
319 | category: 7, | 319 | category: 7, |
320 | licence: 6, | 320 | licence: 6, |
321 | language: 12, | 321 | language: 'ko', |
322 | nsfw: false, | 322 | nsfw: false, |
323 | description: 'my super description for server 3-2', | 323 | description: 'my super description for server 3-2', |
324 | support: 'my super support text for server 3-2', | 324 | support: 'my super support text for server 3-2', |
@@ -597,7 +597,7 @@ describe('Test multiple servers', function () { | |||
597 | name: 'my super video updated', | 597 | name: 'my super video updated', |
598 | category: 10, | 598 | category: 10, |
599 | licence: 7, | 599 | licence: 7, |
600 | language: 13, | 600 | language: 'fr', |
601 | nsfw: true, | 601 | nsfw: true, |
602 | description: 'my super description updated', | 602 | description: 'my super description updated', |
603 | support: 'my super support text updated', | 603 | support: 'my super support text updated', |
@@ -626,7 +626,7 @@ describe('Test multiple servers', function () { | |||
626 | name: 'my super video updated', | 626 | name: 'my super video updated', |
627 | category: 10, | 627 | category: 10, |
628 | licence: 7, | 628 | licence: 7, |
629 | language: 13, | 629 | language: 'fr', |
630 | nsfw: true, | 630 | nsfw: true, |
631 | description: 'my super description updated', | 631 | description: 'my super description updated', |
632 | support: 'my super support text updated', | 632 | support: 'my super support text updated', |
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts index 7c4bdf8bc..5e163e9df 100644 --- a/server/tests/api/videos/single-server.ts +++ b/server/tests/api/videos/single-server.ts | |||
@@ -23,7 +23,7 @@ describe('Test a single server', function () { | |||
23 | name: 'my super name', | 23 | name: 'my super name', |
24 | category: 2, | 24 | category: 2, |
25 | licence: 6, | 25 | licence: 6, |
26 | language: 3, | 26 | language: 'zh', |
27 | nsfw: true, | 27 | nsfw: true, |
28 | description: 'my super description', | 28 | description: 'my super description', |
29 | support: 'my super support text', | 29 | support: 'my super support text', |
@@ -54,7 +54,7 @@ describe('Test a single server', function () { | |||
54 | name: 'my super video updated', | 54 | name: 'my super video updated', |
55 | category: 4, | 55 | category: 4, |
56 | licence: 2, | 56 | licence: 2, |
57 | language: 5, | 57 | language: 'ar', |
58 | nsfw: false, | 58 | nsfw: false, |
59 | description: 'my super description updated', | 59 | description: 'my super description updated', |
60 | support: 'my super support text updated', | 60 | support: 'my super support text updated', |
@@ -115,7 +115,7 @@ describe('Test a single server', function () { | |||
115 | const languages = res.body | 115 | const languages = res.body |
116 | expect(Object.keys(languages)).to.have.length.above(5) | 116 | expect(Object.keys(languages)).to.have.length.above(5) |
117 | 117 | ||
118 | expect(languages[3]).to.equal('Mandarin') | 118 | expect(languages['ru']).to.equal('Russian') |
119 | }) | 119 | }) |
120 | 120 | ||
121 | it('Should list video privacies', async function () { | 121 | it('Should list video privacies', async function () { |
@@ -222,8 +222,8 @@ describe('Test a single server', function () { | |||
222 | // expect(video.categoryLabel).to.equal('Films') | 222 | // expect(video.categoryLabel).to.equal('Films') |
223 | // expect(video.licence).to.equal(6) | 223 | // expect(video.licence).to.equal(6) |
224 | // expect(video.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives') | 224 | // expect(video.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives') |
225 | // expect(video.language).to.equal(3) | 225 | // expect(video.language).to.equal('zh') |
226 | // expect(video.languageLabel).to.equal('Mandarin') | 226 | // expect(video.languageLabel).to.equal('Chinese') |
227 | // expect(video.nsfw).to.be.ok | 227 | // expect(video.nsfw).to.be.ok |
228 | // expect(video.description).to.equal('my super description') | 228 | // expect(video.description).to.equal('my super description') |
229 | // expect(video.account.name).to.equal('root') | 229 | // expect(video.account.name).to.equal('root') |
@@ -292,7 +292,7 @@ describe('Test a single server', function () { | |||
292 | description: video + ' description', | 292 | description: video + ' description', |
293 | category: 2, | 293 | category: 2, |
294 | licence: 1, | 294 | licence: 1, |
295 | language: 1, | 295 | language: 'en', |
296 | nsfw: true, | 296 | nsfw: true, |
297 | tags: [ 'tag1', 'tag2', 'tag3' ], | 297 | tags: [ 'tag1', 'tag2', 'tag3' ], |
298 | fixture: video | 298 | fixture: video |
@@ -458,7 +458,7 @@ describe('Test a single server', function () { | |||
458 | name: 'my super video updated', | 458 | name: 'my super video updated', |
459 | category: 4, | 459 | category: 4, |
460 | licence: 2, | 460 | licence: 2, |
461 | language: 5, | 461 | language: 'ar', |
462 | nsfw: false, | 462 | nsfw: false, |
463 | description: 'my super description updated', | 463 | description: 'my super description updated', |
464 | commentsEnabled: false, | 464 | commentsEnabled: false, |