diff options
| author | おさむのひと <46447427+samunohito@users.noreply.github.com> | 2024-10-05 12:51:46 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-05 12:51:46 +0900 |
| commit | 88698462a91e0fe15501a44f923a812d169bb030 (patch) | |
| tree | 43e9cbb5e67e1f0cb03df3e81681b9575922fdfc /packages/backend/test/unit | |
| parent | fix: signin の資格情報が足りないだけの場合はエラーにせ... (diff) | |
| download | misskey-88698462a91e0fe15501a44f923a812d169bb030.tar.gz misskey-88698462a91e0fe15501a44f923a812d169bb030.tar.bz2 misskey-88698462a91e0fe15501a44f923a812d169bb030.zip | |
feat(backend): 通報および通報解決時に送出されるSystemWebhookにユーザ情報を含めるようにする (#14698)
* feat(backend): 通報および通報解決時に送出されるSystemWebhookにユーザ情報を含めるようにする
* テスト送信もペイロード形式を合わせる
* add spaces
* fix test
Diffstat (limited to 'packages/backend/test/unit')
| -rw-r--r-- | packages/backend/test/unit/AbuseReportNotificationService.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/backend/test/unit/AbuseReportNotificationService.ts b/packages/backend/test/unit/AbuseReportNotificationService.ts index e971659070..235af29f0d 100644 --- a/packages/backend/test/unit/AbuseReportNotificationService.ts +++ b/packages/backend/test/unit/AbuseReportNotificationService.ts @@ -5,6 +5,7 @@ import { jest } from '@jest/globals'; import { Test, TestingModule } from '@nestjs/testing'; +import { randomString } from '../utils.js'; import { AbuseReportNotificationService } from '@/core/AbuseReportNotificationService.js'; import { AbuseReportNotificationRecipientRepository, @@ -25,7 +26,7 @@ import { ModerationLogService } from '@/core/ModerationLogService.js'; import { GlobalEventService } from '@/core/GlobalEventService.js'; import { RecipientMethod } from '@/models/AbuseReportNotificationRecipient.js'; import { SystemWebhookService } from '@/core/SystemWebhookService.js'; -import { randomString } from '../utils.js'; +import { UserEntityService } from '@/core/entities/UserEntityService.js'; process.env.NODE_ENV = 'test'; @@ -111,6 +112,9 @@ describe('AbuseReportNotificationService', () => { provide: SystemWebhookService, useFactory: () => ({ enqueueSystemWebhook: jest.fn() }), }, { + provide: UserEntityService, useFactory: () => ({ pack: (v: any) => v }), + }, + { provide: EmailService, useFactory: () => ({ sendEmail: jest.fn() }), }, { |