From 9d3ef9fe052ed29bd67566754cb28662bd122234 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 23 Apr 2018 14:39:52 +0200 Subject: Use ISO 639 for languages --- server/tests/api/check-params/videos.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'server/tests/api/check-params/videos.ts') diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts index 1d19daa60..da41f515b 100644 --- a/server/tests/api/check-params/videos.ts +++ b/server/tests/api/check-params/videos.ts @@ -105,7 +105,7 @@ describe('Test videos API validator', function () { name: 'my super name', category: 5, licence: 1, - language: 6, + language: 'pt', nsfw: false, commentsEnabled: true, description: 'my super description', @@ -151,7 +151,7 @@ describe('Test videos API validator', function () { }) it('Should fail with a bad language', async function () { - const fields = immutableAssign(baseCorrectParams, { language: 125 }) + const fields = immutableAssign(baseCorrectParams, { language: 'a'.repeat(15) }) const attaches = baseCorrectAttaches await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) @@ -359,7 +359,7 @@ describe('Test videos API validator', function () { name: 'my super name', category: 5, licence: 2, - language: 6, + language: 'pt', nsfw: false, commentsEnabled: false, description: 'my super description', @@ -413,7 +413,7 @@ describe('Test videos API validator', function () { }) it('Should fail with a bad language', async function () { - const fields = immutableAssign(baseCorrectParams, { language: 125 }) + const fields = immutableAssign(baseCorrectParams, { language: 'a'.repeat(15) }) await makePutBodyRequest({ url: server.url, path: path + videoId, token: server.accessToken, fields }) }) -- cgit v1.2.3