improve tests

This commit is contained in:
Moriz Wahl 2022-01-12 12:51:16 +01:00
parent c05f32cf5f
commit 899994c128
3 changed files with 11 additions and 2 deletions

View File

@ -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 }}
##############################################################################

View File

@ -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()
})

View File

@ -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!'),
})