From 0dd57e4d43b06a70a45b77f2006f805f9a42116c Mon Sep 17 00:00:00 2001
From: Chocobozzz <me@florianbigard.com>
Date: Mon, 20 Apr 2020 09:04:38 +0200
Subject: Fix tests

---
 server/lib/job-queue/handlers/activitypub-follow.ts  |  2 +-
 server/tests/api/notifications/user-notifications.ts | 19 ++++++++++---------
 2 files changed, 11 insertions(+), 10 deletions(-)

(limited to 'server')

diff --git a/server/lib/job-queue/handlers/activitypub-follow.ts b/server/lib/job-queue/handlers/activitypub-follow.ts
index 94eeed4c0..e467c5b1b 100644
--- a/server/lib/job-queue/handlers/activitypub-follow.ts
+++ b/server/lib/job-queue/handlers/activitypub-follow.ts
@@ -36,7 +36,7 @@ async function processActivityPubFollow (job: Bull.Job) {
   }
 
   if (payload.assertIsChannel && !targetActor.VideoChannel) {
-    logger.warn('Do not follow %s@%s because it is not a channel.', name, host)
+    logger.warn('Do not follow %s@%s because it is not a channel.', payload.name, host)
     return
   }
 
diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts
index 625e344fa..3c9c7fe31 100644
--- a/server/tests/api/notifications/user-notifications.ts
+++ b/server/tests/api/notifications/user-notifications.ts
@@ -1024,15 +1024,16 @@ describe('Test users notifications', function () {
       await removeUserSubscription(servers[1].url, servers[1].accessToken, 'user_1_channel@localhost:' + servers[0].port)
     })
 
-    it('Should notify when a local account is following one of our channel', async function () {
-      this.timeout(10000)
-
-      await addUserSubscription(servers[0].url, servers[0].accessToken, 'user_1@localhost:' + servers[0].port)
-
-      await waitJobs(servers)
-
-      await checkNewActorFollow(baseParams, 'account', 'root', 'super root name', myUserName, 'presence')
-    })
+    // PeerTube does not support accout -> account follows
+    // it('Should notify when a local account is following one of our channel', async function () {
+    //   this.timeout(10000)
+    //
+    //   await addUserSubscription(servers[0].url, servers[0].accessToken, 'user_1@localhost:' + servers[0].port)
+    //
+    //   await waitJobs(servers)
+    //
+    //   await checkNewActorFollow(baseParams, 'account', 'root', 'super root name', myUserName, 'presence')
+    // })
 
     it('Should notify when a remote account is following one of our channel', async function () {
       this.timeout(10000)
-- 
cgit v1.2.3