1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

Improving settingsTest #683

This commit is contained in:
Patrik J. Braun 2023-07-30 16:11:46 +02:00
parent 1df147401f
commit 15c79ad68d

View File

@ -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: {},