X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fserver%2Femail.ts;h=5929a3adbe6fc004f6d4da0420abb6e356d0a927;hb=bec4ea343987c69252b84d02f444c0f033d4a3f9;hp=9ccb1c36fd0fa2e8d7138f1d643b4f4580388008;hpb=7243f84db0f34c6d5610a54603b0cce7c284a7b3;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/server/email.ts b/server/tests/api/server/email.ts index 9ccb1c36f..5929a3adb 100644 --- a/server/tests/api/server/email.ts +++ b/server/tests/api/server/email.ts @@ -37,15 +37,17 @@ describe('Test emails', function () { username: 'user_1', password: 'super_password' } + let emailPort: number before(async function () { this.timeout(30000) - await MockSmtpServer.Instance.collectEmails(emails) + emailPort = await MockSmtpServer.Instance.collectEmails(emails) const overrideConfig = { smtp: { - hostname: 'localhost' + hostname: 'localhost', + port: emailPort } } server = await flushAndRunServer(1, overrideConfig) @@ -134,7 +136,7 @@ describe('Test emails', function () { expect(email['from'][0]['name']).equal('localhost:' + server.port) expect(email['from'][0]['address']).equal('test-admin@localhost') - expect(email['to'][0]['address']).equal('admin1@example.com') + expect(email['to'][0]['address']).equal('admin' + server.internalServerNumber + '@example.com') expect(email['subject']).contains('abuse') expect(email['text']).contains(videoUUID) })