mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
17 lines
640 B
JavaScript
17 lines
640 B
JavaScript
|
const assert = require('assert');
|
||
|
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);
|
||
|
});
|
||
|
});
|