Ghost/ghost/email-events/test/lib/EmailTemporaryBouncedEvent.test.js

23 lines
827 B
JavaScript
Raw Normal View History

const assert = require('assert');
const ObjectID = require('bson-objectid').default;
const EmailTemporaryBouncedEvent = require('../../lib/EmailTemporaryBouncedEvent');
describe('EmailTemporaryBouncedEvent', function () {
it('exports a static create method to create instances', function () {
const event = EmailTemporaryBouncedEvent.create({
id: 'id',
email: 'test@test.test',
memberId: new ObjectID().toHexString(),
emailId: new ObjectID().toHexString(),
emailRecipientId: new ObjectID().toHexString(),
timestamp: new Date(),
error: {
message: 'test',
code: 1,
enhancedCode: '1.1'
}
});
assert(event instanceof EmailTemporaryBouncedEvent);
});
});