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 14:49:55 +02:00
parent cb8553896f
commit 4ab60098e0

View File

@ -40,6 +40,7 @@ describe('Settings middleware', () => {
expect(Config.Users.enforcedUsers.length).to.be.equal(0); expect(Config.Users.enforcedUsers.length).to.be.equal(0);
done(); done();
} catch (err) { } catch (err) {
console.error(err);
done(err); done(err);
} }
}; };
@ -48,6 +49,8 @@ describe('Settings middleware', () => {
}); });
it('should save enforced users settings', (done: (err?: any) => void) => { it('should save enforced users settings', (done: (err?: any) => void) => {
ServerEnvironment.sendMailAvailable = false;
const req: any = { const req: any = {
session: {}, session: {},
sessionOptions: {}, sessionOptions: {},
@ -76,6 +79,7 @@ describe('Settings middleware', () => {
done(); done();
}).catch(done); }).catch(done);
} catch (err) { } catch (err) {
console.error(err);
done(err); done(err);
} }
}; };