]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/handle-down.ts
Fix socket.io websocket connection
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / handle-down.ts
index e6e0d6c7a6b9b23a49009299fc12b70620d07c59..8e162b69ec1452a144ae1a0b1c612f5e64bde4dc 100644 (file)
@@ -5,6 +5,7 @@ import 'mocha'
 import { JobState, Video } from '../../../../shared/models'
 import { VideoPrivacy } from '../../../../shared/models/videos'
 import { VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
+
 import {
   completeVideoCheck,
   getVideo,
@@ -18,6 +19,7 @@ import {
   ServerInfo,
   setAccessTokensToServers,
   uploadVideo,
+  updateVideo,
   wait
 } from '../../../../shared/utils'
 import { follow, getFollowersListPaginationAndSort } from '../../../../shared/utils/server/follows'
@@ -199,15 +201,15 @@ describe('Test handle downs', function () {
     expect(res.body.data).to.have.lengthOf(2)
   })
 
-  it('Should send a view to server 3, and automatically fetch the video', async function () {
+  it('Should send an update to server 3, and automatically fetch the video', async function () {
     this.timeout(15000)
 
     const res1 = await getVideosList(servers[2].url)
     expect(res1.body.data).to.be.an('array')
     expect(res1.body.data).to.have.lengthOf(11)
 
-    await viewVideo(servers[0].url, missedVideo1.uuid)
-    await viewVideo(servers[0].url, unlistedVideo.uuid)
+    await updateVideo(servers[0].url, servers[0].accessToken, missedVideo1.uuid, { })
+    await updateVideo(servers[0].url, servers[0].accessToken, unlistedVideo.uuid, { })
 
     await waitJobs(servers)