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