ec4045cb57
refs https://github.com/TryGhost/Toolbox/issues/503 - Reusing existing events inside of dynamic routing would only contribute to general confusion that is already there. Having separate "DomainEvents" is the best practice used throughout the code which is substituting generic events. - The URLResourceUpdatedEvent is supposed to be emmited whenever there's an updated to the resource already associated with the URL circumventing full url regeneration process inside of DynamicRouting
13 lines
386 B
JavaScript
13 lines
386 B
JavaScript
const assert = require('assert');
|
|
const {URLResourceUpdatedEvent} = require('../../index');
|
|
|
|
describe('URLResourceUpdatedEvent', function () {
|
|
it('exports a static create method to create instances', function () {
|
|
const event = URLResourceUpdatedEvent.create({
|
|
id: 'resource-id'
|
|
});
|
|
|
|
assert(event instanceof URLResourceUpdatedEvent);
|
|
});
|
|
});
|