]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/video-channels.ts
Add new player string to custom translations
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / video-channels.ts
index 0f8227fd3cf62f62d961e079d7f817008ef67e15..6f495c42d0abe2171c62dbf9863d421d760c1211 100644 (file)
@@ -325,6 +325,24 @@ describe('Test video channels', function () {
     }
   })
 
+  it('Should still correctly list channels', async function () {
+    {
+      const body = await servers[0].channels.list({ start: 1, count: 1, sort: 'createdAt' })
+
+      expect(body.total).to.equal(3)
+      expect(body.data).to.have.lengthOf(1)
+      expect(body.data[0].name).to.equal('second_video_channel')
+    }
+
+    {
+      const body = await servers[0].channels.listByAccount({ accountName, start: 1, count: 1, sort: 'createdAt' })
+
+      expect(body.total).to.equal(2)
+      expect(body.data).to.have.lengthOf(1)
+      expect(body.data[0].name).to.equal('second_video_channel')
+    }
+  })
+
   it('Should delete the video channel avatar', async function () {
     this.timeout(15000)
     await servers[0].channels.deleteImage({ channelName: 'second_video_channel', type: 'avatar' })
@@ -448,8 +466,8 @@ describe('Test video channels', function () {
 
     {
       // video has been posted on channel servers[0].store.videoChannel.id since last update
-      await servers[0].videos.view({ id: videoUUID, xForwardedFor: '0.0.0.1,127.0.0.1' })
-      await servers[0].videos.view({ id: videoUUID, xForwardedFor: '0.0.0.2,127.0.0.1' })
+      await servers[0].views.simulateView({ id: videoUUID, xForwardedFor: '0.0.0.1,127.0.0.1' })
+      await servers[0].views.simulateView({ id: videoUUID, xForwardedFor: '0.0.0.2,127.0.0.1' })
 
       // Wait the repeatable job
       await wait(8000)