瀏覽代碼

Fix tests

Chocobozzz 4 年之前
父節點
當前提交
2ba613a543
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. 1 1
      server/lib/activitypub/follow.ts
  2. 4 0
      server/tests/api/server/auto-follows.ts

+ 1 - 1
server/lib/activitypub/follow.ts

@@ -4,7 +4,7 @@ import { SERVER_ACTOR_NAME } from '../../initializers/constants'
 import { JobQueue } from '../job-queue'
 import { logger } from '../../helpers/logger'
 import { getServerActor } from '../../helpers/utils'
-import { ServerModel } from '@server/models/server/server'
+import { ServerModel } from '../../models/server/server'
 
 async function autoFollowBackIfNeeded (actorFollow: MActorFollowActors) {
   if (!CONFIG.FOLLOWINGS.INSTANCE.AUTO_FOLLOW_BACK.ENABLED) return

+ 4 - 0
server/tests/api/server/auto-follows.ts

@@ -143,6 +143,10 @@ describe('Test auto follows', function () {
       await checkFollow(servers[1], servers[0], true)
 
       await resetFollows(servers)
+
+      config.followings.instance.autoFollowBack.enabled = false
+      config.followers.instance.manualApproval = false
+      await updateCustomSubConfig(servers[1].url, servers[1].accessToken, config)
     })
   })