aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
authorJosh Morel <morel.josh@hotmail.com>2018-12-15 08:51:51 -0500
committerChocobozzz <me@florianbigard.com>2018-12-17 10:59:07 +0100
commitaf37210c0bd7bf343fe366ddd2b253e2214f5547 (patch)
treeefb08450a3c1d91429e4fc5a9bc6b2a9e7cae0ba /server/tests
parent8fc58cb580994efe8f5167739568afadfe9850d7 (diff)
downloadPeerTube-af37210c0bd7bf343fe366ddd2b253e2214f5547.tar.gz
PeerTube-af37210c0bd7bf343fe366ddd2b253e2214f5547.tar.zst
PeerTube-af37210c0bd7bf343fe366ddd2b253e2214f5547.zip
throw error if MailDev doesn't run
also allow calling in multiple file
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/server/email.ts4
-rw-r--r--server/tests/api/users/users-verification.ts4
2 files changed, 4 insertions, 4 deletions
diff --git a/server/tests/api/server/email.ts b/server/tests/api/server/email.ts
index 13df772c6..b8d29ef81 100644
--- a/server/tests/api/server/email.ts
+++ b/server/tests/api/server/email.ts
@@ -20,7 +20,7 @@ import {
20 ServerInfo, 20 ServerInfo,
21 setAccessTokensToServers 21 setAccessTokensToServers
22} from '../../../../shared/utils' 22} from '../../../../shared/utils'
23import { mockSmtpServer } from '../../../../shared/utils/miscs/email' 23import { MockSmtpServer } from '../../../../shared/utils/miscs/email'
24import { waitJobs } from '../../../../shared/utils/server/jobs' 24import { waitJobs } from '../../../../shared/utils/server/jobs'
25 25
26const expect = chai.expect 26const expect = chai.expect
@@ -41,7 +41,7 @@ describe('Test emails', function () {
41 before(async function () { 41 before(async function () {
42 this.timeout(30000) 42 this.timeout(30000)
43 43
44 await mockSmtpServer(emails) 44 await MockSmtpServer.Instance.collectEmails(emails)
45 45
46 await flushTests() 46 await flushTests()
47 47
diff --git a/server/tests/api/users/users-verification.ts b/server/tests/api/users/users-verification.ts
index b1733e45e..afc8a0059 100644
--- a/server/tests/api/users/users-verification.ts
+++ b/server/tests/api/users/users-verification.ts
@@ -7,7 +7,7 @@ import {
7 userLogin, login, runServer, ServerInfo, verifyEmail, updateCustomSubConfig 7 userLogin, login, runServer, ServerInfo, verifyEmail, updateCustomSubConfig
8} from '../../../../shared/utils' 8} from '../../../../shared/utils'
9import { setAccessTokensToServers } from '../../../../shared/utils/users/login' 9import { setAccessTokensToServers } from '../../../../shared/utils/users/login'
10import { mockSmtpServer } from '../../../../shared/utils/miscs/email' 10import { MockSmtpServer } from '../../../../shared/utils/miscs/email'
11import { waitJobs } from '../../../../shared/utils/server/jobs' 11import { waitJobs } from '../../../../shared/utils/server/jobs'
12 12
13const expect = chai.expect 13const expect = chai.expect
@@ -30,7 +30,7 @@ describe('Test users account verification', function () {
30 before(async function () { 30 before(async function () {
31 this.timeout(30000) 31 this.timeout(30000)
32 32
33 await mockSmtpServer(emails) 33 await MockSmtpServer.Instance.collectEmails(emails)
34 34
35 await flushTests() 35 await flushTests()
36 36