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