From 15c79ad68daa47693febdf8c700145d32c3f8726 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Sun, 30 Jul 2023 16:11:46 +0200 Subject: [PATCH] Improving settingsTest #683 --- test/backend/unit/middlewares/admin/SettingsMWs.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/backend/unit/middlewares/admin/SettingsMWs.ts b/test/backend/unit/middlewares/admin/SettingsMWs.ts index a159def3..8a759748 100644 --- a/test/backend/unit/middlewares/admin/SettingsMWs.ts +++ b/test/backend/unit/middlewares/admin/SettingsMWs.ts @@ -8,6 +8,7 @@ import {Config} from '../../../../../src/common/config/private/Config'; import {UserRoles} from '../../../../../src/common/entities/UserDTO'; import {ConfigClassBuilder} from '../../../../../node_modules/typeconfig/node'; import {ServerEnvironment} from '../../../../../src/backend/Environment'; +import {EmailMessagingType} from '../../../../../src/common/config/private/MessagingConfig'; declare const describe: any; @@ -24,6 +25,7 @@ describe('Settings middleware', () => { ServerEnvironment.sendMailAvailable = false; Config.Environment.sendMailAvailable = false; + Config.Messaging.Email.type = EmailMessagingType.sendmail; const req: any = { session: {}, sessionOptions: {}, @@ -52,7 +54,8 @@ describe('Settings middleware', () => { it('should save enforced users settings', (done: (err?: any) => void) => { ServerEnvironment.sendMailAvailable = false; - Config.Environment.sendMailAvailable = false; + Config.Environment.sendMailAvailable = false + Config.Messaging.Email.type = EmailMessagingType.sendmail;; const req: any = { session: {}, sessionOptions: {},