diff --git a/packages/backend/test/e2e/note.ts b/packages/backend/test/e2e/note.ts index 763ffd9d16..c2509c88ad 100644 --- a/packages/backend/test/e2e/note.ts +++ b/packages/backend/test/e2e/note.ts @@ -665,7 +665,7 @@ describe('Note', () => { assert.strictEqual(note2.body.error.code, 'CONTAINS_PROHIBITED_WORDS'); }); - test('禁止ワードを含んでいてもリモートノートはエラーにならない', async () => { + test('禁止ワードを含む投稿はエラーになる (リモート)', async () => { const prohibited = await api('admin/update-meta', { prohibitedWords: [ 'test', @@ -676,11 +676,12 @@ describe('Note', () => { await new Promise(x => setTimeout(x, 2)); - const note1 = await api('/notes/create', { + const note3 = await api('/notes/create', { text: 'hogetesthuge', }, tom); - assert.strictEqual(note1.status, 200); + assert.strictEqual(note3.status, 400); + assert.strictEqual(note3.body.error.code, 'CONTAINS_PROHIBITED_WORDS'); }); }); diff --git a/packages/backend/test/unit/activitypub.ts b/packages/backend/test/unit/activitypub.ts index 63952e6434..c150165ee3 100644 --- a/packages/backend/test/unit/activitypub.ts +++ b/packages/backend/test/unit/activitypub.ts @@ -100,6 +100,7 @@ describe('ActivityPub', () => { perRemoteUserUserTimelineCacheMax: 100, blockedHosts: [] as string[], sensitiveWords: [] as string[], + prohibitedWords: [] as string[], } as MiMeta; let meta = metaInitial;