]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/videos.ts
Update video channel routes
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / videos.ts
index 1d19daa60b740becdd2b120ee824feca8935bea1..da41f515b7f6401f9e01c5cc58654185c4d2da48 100644 (file)
@@ -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 })
     })