diff options
author | Chocobozzz <me@florianbigard.com> | 2019-09-04 15:50:40 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-09-04 16:24:58 +0200 |
commit | 2ba613a5438f993c3874376dd79be9d460ea81d1 (patch) | |
tree | 7774787f595d89c71b5df27097005e9734881c1d | |
parent | e1b49ee534108ba8ac98dcb209d2efcbf1ecd678 (diff) | |
download | PeerTube-2ba613a5438f993c3874376dd79be9d460ea81d1.tar.gz PeerTube-2ba613a5438f993c3874376dd79be9d460ea81d1.tar.zst PeerTube-2ba613a5438f993c3874376dd79be9d460ea81d1.zip |
Fix tests
-rw-r--r-- | server/lib/activitypub/follow.ts | 2 | ||||
-rw-r--r-- | server/tests/api/server/auto-follows.ts | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/server/lib/activitypub/follow.ts b/server/lib/activitypub/follow.ts index c57e43c91..1abf43cd4 100644 --- a/server/lib/activitypub/follow.ts +++ b/server/lib/activitypub/follow.ts | |||
@@ -4,7 +4,7 @@ import { SERVER_ACTOR_NAME } from '../../initializers/constants' | |||
4 | import { JobQueue } from '../job-queue' | 4 | import { JobQueue } from '../job-queue' |
5 | import { logger } from '../../helpers/logger' | 5 | import { logger } from '../../helpers/logger' |
6 | import { getServerActor } from '../../helpers/utils' | 6 | import { getServerActor } from '../../helpers/utils' |
7 | import { ServerModel } from '@server/models/server/server' | 7 | import { ServerModel } from '../../models/server/server' |
8 | 8 | ||
9 | async function autoFollowBackIfNeeded (actorFollow: MActorFollowActors) { | 9 | async function autoFollowBackIfNeeded (actorFollow: MActorFollowActors) { |
10 | if (!CONFIG.FOLLOWINGS.INSTANCE.AUTO_FOLLOW_BACK.ENABLED) return | 10 | if (!CONFIG.FOLLOWINGS.INSTANCE.AUTO_FOLLOW_BACK.ENABLED) return |
diff --git a/server/tests/api/server/auto-follows.ts b/server/tests/api/server/auto-follows.ts index dea9191f2..df468034c 100644 --- a/server/tests/api/server/auto-follows.ts +++ b/server/tests/api/server/auto-follows.ts | |||
@@ -143,6 +143,10 @@ describe('Test auto follows', function () { | |||
143 | await checkFollow(servers[1], servers[0], true) | 143 | await checkFollow(servers[1], servers[0], true) |
144 | 144 | ||
145 | await resetFollows(servers) | 145 | await resetFollows(servers) |
146 | |||
147 | config.followings.instance.autoFollowBack.enabled = false | ||
148 | config.followers.instance.manualApproval = false | ||
149 | await updateCustomSubConfig(servers[1].url, servers[1].accessToken, config) | ||
146 | }) | 150 | }) |
147 | }) | 151 | }) |
148 | 152 | ||