]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/multiple-servers.ts
Playlist server API
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / multiple-servers.ts
index 6c281e49e850b6b9235db85455ee2dbff5e1a9c8..7e2fcb630ef43831c0ddfd96f4d9b4b9d3ca3d98 100644 (file)
@@ -98,6 +98,7 @@ describe('Test multiple servers', function () {
         nsfw: true,
         description: 'my super description for server 1',
         support: 'my super support text for server 1',
+        originallyPublishedAt: '2019-02-10T13:38:14.449Z',
         tags: [ 'tag1p1', 'tag2p1' ],
         channelId: videoChannelId,
         fixture: 'video_short1.webm'
@@ -118,6 +119,7 @@ describe('Test multiple servers', function () {
           nsfw: true,
           description: 'my super description for server 1',
           support: 'my super support text for server 1',
+          originallyPublishedAt: '2019-02-10T13:38:14.449Z',
           account: {
             name: 'root',
             host: 'localhost:9001'
@@ -128,6 +130,7 @@ describe('Test multiple servers', function () {
           tags: [ 'tag1p1', 'tag2p1' ],
           privacy: VideoPrivacy.PUBLIC,
           commentsEnabled: true,
+          downloadEnabled: true,
           channel: {
             displayName: 'my channel',
             name: 'super_channel_name',
@@ -199,6 +202,7 @@ describe('Test multiple servers', function () {
           },
           isLocal,
           commentsEnabled: true,
+          downloadEnabled: true,
           duration: 5,
           tags: [ 'tag1p2', 'tag2p2', 'tag3p2' ],
           privacy: VideoPrivacy.PUBLIC,
@@ -307,6 +311,7 @@ describe('Test multiple servers', function () {
           isLocal,
           duration: 5,
           commentsEnabled: true,
+          downloadEnabled: true,
           tags: [ 'tag1p3' ],
           privacy: VideoPrivacy.PUBLIC,
           channel: {
@@ -338,6 +343,7 @@ describe('Test multiple servers', function () {
             host: 'localhost:9003'
           },
           commentsEnabled: true,
+          downloadEnabled: true,
           isLocal,
           duration: 5,
           tags: [ 'tag2p3', 'tag3p3', 'tag4p3' ],
@@ -621,6 +627,7 @@ describe('Test multiple servers', function () {
         support: 'my super support text updated',
         tags: [ 'tag_up_1', 'tag_up_2' ],
         thumbnailfile: 'thumbnail.jpg',
+        originallyPublishedAt: '2019-02-11T13:38:14.449Z',
         previewfile: 'preview.jpg'
       }
 
@@ -648,6 +655,7 @@ describe('Test multiple servers', function () {
           nsfw: true,
           description: 'my super description updated',
           support: 'my super support text updated',
+          originallyPublishedAt: '2019-02-11T13:38:14.449Z',
           account: {
             name: 'root',
             host: 'localhost:9003'
@@ -655,6 +663,7 @@ describe('Test multiple servers', function () {
           isLocal,
           duration: 5,
           commentsEnabled: true,
+          downloadEnabled: true,
           tags: [ 'tag_up_1', 'tag_up_2' ],
           privacy: VideoPrivacy.PUBLIC,
           channel: {
@@ -914,11 +923,12 @@ describe('Test multiple servers', function () {
       }
     })
 
-    it('Should disable comments', async function () {
+    it('Should disable comments and download', async function () {
       this.timeout(20000)
 
       const attributes = {
-        commentsEnabled: false
+        commentsEnabled: false,
+        downloadEnabled: false
       }
 
       await updateVideo(servers[0].url, servers[0].accessToken, videoUUID, attributes)
@@ -928,6 +938,7 @@ describe('Test multiple servers', function () {
       for (const server of servers) {
         const res = await getVideo(server.url, videoUUID)
         expect(res.body.commentsEnabled).to.be.false
+        expect(res.body.downloadEnabled).to.be.false
 
         const text = 'my super forbidden comment'
         await addVideoCommentThread(server.url, server.accessToken, videoUUID, text, 409)
@@ -976,6 +987,7 @@ describe('Test multiple servers', function () {
           isLocal,
           duration: 5,
           commentsEnabled: false,
+          downloadEnabled: true,
           tags: [ ],
           privacy: VideoPrivacy.PUBLIC,
           channel: {