]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/auto-follows.ts
Fix admin edition disabling feature
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / auto-follows.ts
index ce7b519252517f490bcf891aa31cce117798e8ad..90a668edb05b1fe6b980e7d873f20a47d0f6184b 100644 (file)
@@ -19,16 +19,16 @@ async function checkFollow (follower: PeerTubeServer, following: PeerTubeServer,
     const body = await following.follows.getFollowers({ start: 0, count: 5, sort: '-createdAt' })
     const follow = body.data.find(f => f.follower.host === follower.host && f.state === 'accepted')
 
-    if (exists === true) expect(follow).to.exist
-    else expect(follow).to.be.undefined
+    if (exists === true) expect(follow, `Follower ${follower.url} should exist on ${following.url}`).to.exist
+    else expect(follow, `Follower ${follower.url} should not exist on ${following.url}`).to.be.undefined
   }
 
   {
     const body = await follower.follows.getFollowings({ start: 0, count: 5, sort: '-createdAt' })
     const follow = body.data.find(f => f.following.host === following.host && f.state === 'accepted')
 
-    if (exists === true) expect(follow).to.exist
-    else expect(follow).to.be.undefined
+    if (exists === true) expect(follow, `Following ${following.url} should exist on ${follower.url}`).to.exist
+    else expect(follow, `Following ${following.url} should not exist on ${follower.url}`).to.be.undefined
   }
 }
 
@@ -186,6 +186,10 @@ describe('Test auto follows', function () {
       await checkFollow(servers[0], servers[1], false)
       await checkFollow(servers[0], servers[2], true)
     })
+
+    after(async function () {
+      await instanceIndexServer.terminate()
+    })
   })
 
   after(async function () {