mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-03 03:55:26 +03:00
16 lines
595 B
JavaScript
16 lines
595 B
JavaScript
|
const assert = require('assert');
|
||
|
const ObjectID = require('bson-objectid').default;
|
||
|
const EmailUnsubscribedEvent = require('../../lib/EmailUnsubscribedEvent');
|
||
|
|
||
|
describe('EmailUnsubscribedEvent', function () {
|
||
|
it('exports a static create method to create instances', function () {
|
||
|
const event = EmailUnsubscribedEvent.create({
|
||
|
email: 'test@test.test',
|
||
|
memberId: new ObjectID().toHexString(),
|
||
|
emailId: new ObjectID().toHexString(),
|
||
|
timestamp: new Date()
|
||
|
});
|
||
|
assert(event instanceof EmailUnsubscribedEvent);
|
||
|
});
|
||
|
});
|