2023-06-21 11:56:59 +03:00
|
|
|
const assert = require('assert/strict');
|
2022-11-29 13:15:19 +03:00
|
|
|
const ObjectID = require('bson-objectid').default;
|
|
|
|
const EmailDeliveredEvent = require('../../lib/EmailDeliveredEvent');
|
|
|
|
|
|
|
|
describe('EmailDeliveredEvent', function () {
|
|
|
|
it('exports a static create method to create instances', function () {
|
|
|
|
const event = EmailDeliveredEvent.create({
|
|
|
|
email: 'test@test.test',
|
|
|
|
memberId: new ObjectID().toHexString(),
|
|
|
|
emailId: new ObjectID().toHexString(),
|
|
|
|
emailRecipientId: new ObjectID().toHexString(),
|
|
|
|
timestamp: new Date()
|
|
|
|
});
|
|
|
|
assert(event instanceof EmailDeliveredEvent);
|
|
|
|
});
|
|
|
|
});
|