diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 51f8e49b0..e243c9184 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -520,7 +520,7 @@ jobs: report_name: Coverage Backend type: lcov result_path: ./backend/coverage/lcov.info - min_coverage: 40 + min_coverage: 41 token: ${{ github.token }} ############################################################################## diff --git a/backend/src/mailer/sendEMail.test.ts b/backend/src/mailer/sendEMail.test.ts index f933dd9b3..5baae00ab 100644 --- a/backend/src/mailer/sendEMail.test.ts +++ b/backend/src/mailer/sendEMail.test.ts @@ -76,6 +76,15 @@ describe('sendEMail', () => { }) }) + it('calls sendMail of transporter', () => { + expect((createTransport as jest.Mock).mock.results[0].value.sendMail).toBeCalledWith({ + from: `Gradido (nicht antworten) <${CONFIG.EMAIL_SENDER}>`, + to: 'receiver@mail.org', + subject: 'Subject', + text: 'Text text text', + }) + }) + it('returns true', () => { expect(result).toBeTruthy() }) diff --git a/backend/src/mailer/sendTransactionReceivedEmail.test.ts b/backend/src/mailer/sendTransactionReceivedEmail.test.ts index 7b4080622..29f227185 100644 --- a/backend/src/mailer/sendTransactionReceivedEmail.test.ts +++ b/backend/src/mailer/sendTransactionReceivedEmail.test.ts @@ -27,7 +27,7 @@ describe('sendTransactionReceivedEmail', () => { subject: 'Gradido Überweisung', text: expect.stringContaining('Hallo Peter Lustig') && - expect.stringContaining('42,00') && + expect.stringContaining('42,00 GDD') && expect.stringContaining('Bibi Bloxberg') && expect.stringContaining('Vielen herzlichen Dank für den neuen Hexenbesen!'), })