mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
improve tests
This commit is contained in:
parent
c05f32cf5f
commit
899994c128
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -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 }}
|
||||
|
||||
##############################################################################
|
||||
|
||||
@ -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()
|
||||
})
|
||||
|
||||
@ -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!'),
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user