From 611749eb8db68ccee5d95d592d52a3186d92fbce Mon Sep 17 00:00:00 2001 From: Johann150 Date: Thu, 10 Feb 2022 17:43:39 +0100 Subject: [PATCH] fix tests --- packages/backend/test/services/blocking.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/backend/test/services/blocking.ts b/packages/backend/test/services/blocking.ts index c57bcae0c..a9faeff4f 100644 --- a/packages/backend/test/services/blocking.ts +++ b/packages/backend/test/services/blocking.ts @@ -4,7 +4,6 @@ import * as assert from 'assert'; import * as childProcess from 'child_process'; import { async, signup, request, post, startServer, shutdownServer, initTestDb } from '../utils'; import * as sinon from 'sinon'; -import config from '@/config/index'; describe('Creating a block activity', () => { let p: childProcess.ChildProcess; @@ -44,14 +43,13 @@ describe('Creating a block activity', () => { assert(spy.calledTwice); })); - it('Should not federate blocks if activityPub.federateBlocks is false', async () => { - const createBlock = (await import('../../src/services/blocking/create')) .default; + it('Should not federate blocks if federateBlocks is false', async () => { + const createBlock = (await import('../../src/services/blocking/create')).default; const deleteBlock = (await import('../../src/services/blocking/delete')).default; + alice.federateBlocks = true; + const queues = await import('../../src/queue/index'); - config.activityPub = { - federateBlocks: false - }; const spy = sinon.spy(queues, 'deliver'); await createBlock(alice, carol); await deleteBlock(alice, carol);