fix(server): http error parsing on endpoints without a default response (#12927)

This commit is contained in:
Jason Rasmussen 2024-09-25 12:05:03 -04:00 committed by GitHub
parent 8d515adac5
commit 005528ab5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 162 additions and 18 deletions

View file

@ -616,11 +616,6 @@ describe(NotificationService.name, () => {
await expect(sut.handleSendEmail({ html: '', subject: '', text: '', to: '' })).resolves.toBe(JobStatus.SKIPPED);
});
it('should fail if email could not be sent', async () => {
systemMock.get.mockResolvedValue({ notifications: { smtp: { enabled: true } } });
await expect(sut.handleSendEmail({ html: '', subject: '', text: '', to: '' })).resolves.toBe(JobStatus.FAILED);
});
it('should send mail successfully', async () => {
systemMock.get.mockResolvedValue({ notifications: { smtp: { enabled: true, from: 'test@immich.app' } } });
notificationMock.sendEmail.mockResolvedValue({ messageId: '', response: '' });