]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/single-server.ts
Add ability to update some configuration keys
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / single-server.ts
index 934c653b19dd0bfe992781fbbe70aa5a36668316..ca20f39a096b82a01f48c67ed9bb42f952e3442f 100644 (file)
@@ -5,33 +5,11 @@ import { keyBy } from 'lodash'
 import 'mocha'
 import { join } from 'path'
 import { VideoPrivacy } from '../../../../shared/models/videos'
+import { readdirPromise } from '../../../helpers/core-utils'
 import {
-  dateIsValid,
-  flushTests,
-  getVideo,
-  getVideoCategories,
-  getVideoLanguages,
-  getVideoLicences,
-  getVideoPrivacies,
-  getVideosList,
-  getVideosListPagination,
-  getVideosListSort,
-  killallServers,
-  rateVideo,
-  readdirPromise,
-  removeVideo,
-  runServer,
-  searchVideo,
-  searchVideoWithPagination,
-  searchVideoWithSort,
-  ServerInfo,
-  setAccessTokensToServers,
-  testVideoImage,
-  updateVideo,
-  uploadVideo,
-  wait,
-  webtorrentAdd,
-  viewVideo, completeVideoCheck, immutableAssign
+  completeVideoCheck, flushTests, getVideo, getVideoCategories, getVideoLanguages, getVideoLicences, getVideoPrivacies,
+  getVideosList, getVideosListPagination, getVideosListSort, killallServers, rateVideo, removeVideo, runServer, searchVideo,
+  searchVideoWithPagination, searchVideoWithSort, ServerInfo, setAccessTokensToServers, testVideoImage, updateVideo, uploadVideo, viewVideo
 } from '../../utils'
 
 const expect = chai.expect
@@ -55,6 +33,7 @@ describe('Test a single server', function () {
     duration: 5,
     tags: [ 'tag1', 'tag2', 'tag3' ],
     privacy: VideoPrivacy.PUBLIC,
+    commentsEnabled: true,
     channel: {
       name: 'Default root channel',
       description: '',
@@ -74,7 +53,7 @@ describe('Test a single server', function () {
     category: 4,
     licence: 2,
     language: 5,
-    nsfw: true,
+    nsfw: false,
     description: 'my super description updated',
     host: 'localhost:9001',
     account: 'root',
@@ -82,6 +61,7 @@ describe('Test a single server', function () {
     tags: [ 'tagup1', 'tagup2' ],
     privacy: VideoPrivacy.PUBLIC,
     duration: 5,
+    commentsEnabled: false,
     channel: {
       name: 'Default root channel',
       description: '',
@@ -498,6 +478,7 @@ describe('Test a single server', function () {
       language: 5,
       nsfw: false,
       description: 'my super description updated',
+      commentsEnabled: false,
       tags: [ 'tagup1', 'tagup2' ]
     }
     await updateVideo(server.url, server.accessToken, videoId, attributes)