test: digest

isekai-main
Barış Soner Uşaklı 2 years ago
parent e0149462b3
commit 61563b01df

@ -1490,21 +1490,19 @@ describe('User', () => {
], done);
});
it('should send digests', (done) => {
it('should send digests', async () => {
const oldValue = meta.config.includeUnverifiedEmails;
meta.config.includeUnverifiedEmails = true;
User.digest.execute({ interval: 'day' }, (err) => {
assert.ifError(err);
meta.config.includeUnverifiedEmails = oldValue;
done();
const uid = await User.create({ username: 'digest' });
await User.digest.execute({
interval: 'day',
subscribers: [uid],
});
meta.config.includeUnverifiedEmails = oldValue;
});
it('should not send digests', (done) => {
User.digest.execute({ interval: 'month' }, (err) => {
assert.ifError(err);
done();
});
it('should not send digests', async () => {
await User.digest.execute({ interval: 'month' });
});
it('should get delivery times', async () => {

Loading…
Cancel
Save