From 6d186ff10dd93b44695de3a12dabb1d1f91eb519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 22 Nov 2021 23:53:13 -0500 Subject: [PATCH] test: add mising email.test tpls --- test/socket.io.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/socket.io.js b/test/socket.io.js index f709e86178..5c890809f1 100644 --- a/test/socket.io.js +++ b/test/socket.io.js @@ -244,7 +244,6 @@ describe('socket.io', () => { }); describe('validation emails', () => { - const meta = require('../src/meta'); const plugins = require('../src/plugins'); async function dummyEmailerHook(data) { @@ -567,11 +566,16 @@ describe('socket.io', () => { }); }); - it('should send test email', (done) => { - socketAdmin.email.test({ uid: adminUid }, { template: 'digest.tpl' }, (err) => { + it('should send test email', async () => { + const tpls = ['digest', 'test', 'verify', 'welcome', 'notification', 'invitation']; + try { + for (const tpl of tpls) { + // eslint-disable-next-line no-await-in-loop + await socketAdmin.email.test({ uid: adminUid }, { template: tpl }); + } + } catch (err) { assert.ifError(err); - done(); - }); + } }); it('should not error when resending digests', async () => {