aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/contact-form.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-24 10:53:40 +0200
committerChocobozzz <me@florianbigard.com>2019-04-24 16:26:23 +0200
commit210feb6cc484a6c5c63c98f770de34e223f944cb (patch)
treed1d841892a7ac87ac0d434194597606a375aaed1 /server/tests/api/check-params/contact-form.ts
parent9cc8d43e37a61709e7275c2a799bdf976dd940ca (diff)
downloadPeerTube-210feb6cc484a6c5c63c98f770de34e223f944cb.tar.gz
PeerTube-210feb6cc484a6c5c63c98f770de34e223f944cb.tar.zst
PeerTube-210feb6cc484a6c5c63c98f770de34e223f944cb.zip
Cleanup tests
Diffstat (limited to 'server/tests/api/check-params/contact-form.ts')
-rw-r--r--server/tests/api/check-params/contact-form.ts12
1 files changed, 3 insertions, 9 deletions
diff --git a/server/tests/api/check-params/contact-form.ts b/server/tests/api/check-params/contact-form.ts
index 9ba6136aa..6c7781f13 100644
--- a/server/tests/api/check-params/contact-form.ts
+++ b/server/tests/api/check-params/contact-form.ts
@@ -7,7 +7,7 @@ import {
7 immutableAssign, 7 immutableAssign,
8 killallServers, 8 killallServers,
9 reRunServer, 9 reRunServer,
10 runServer, 10 flushAndRunServer,
11 ServerInfo, 11 ServerInfo,
12 setAccessTokensToServers 12 setAccessTokensToServers
13} from '../../../../shared/extra-utils' 13} from '../../../../shared/extra-utils'
@@ -34,11 +34,10 @@ describe('Test contact form API validators', function () {
34 before(async function () { 34 before(async function () {
35 this.timeout(60000) 35 this.timeout(60000)
36 36
37 await flushTests()
38 await MockSmtpServer.Instance.collectEmails(emails) 37 await MockSmtpServer.Instance.collectEmails(emails)
39 38
40 // Email is disabled 39 // Email is disabled
41 server = await runServer(1) 40 server = await flushAndRunServer(1)
42 }) 41 })
43 42
44 it('Should not accept a contact form if emails are disabled', async function () { 43 it('Should not accept a contact form if emails are disabled', async function () {
@@ -84,13 +83,8 @@ describe('Test contact form API validators', function () {
84 await sendContactForm(immutableAssign(defaultBody, { url: server.url })) 83 await sendContactForm(immutableAssign(defaultBody, { url: server.url }))
85 }) 84 })
86 85
87 after(async function () { 86 after(function () {
88 MockSmtpServer.Instance.kill() 87 MockSmtpServer.Instance.kill()
89 killallServers([ server ]) 88 killallServers([ server ])
90
91 // Keep the logs if the test failed
92 if (this['ok']) {
93 await flushTests()
94 }
95 }) 89 })
96}) 90})