mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
updated listeners in test to be fully inclusive
no ref -test wasn't previously updated to include all event listeners
This commit is contained in:
parent
ae92d1425d
commit
3186323663
@ -27,7 +27,7 @@ describe('MentionSendingService', function () {
|
||||
});
|
||||
|
||||
describe('listen', function () {
|
||||
it('Calls on post.edited', async function () {
|
||||
it('Calls on post.published, post.published.edited, post.unpublished', async function () {
|
||||
const service = new MentionSendingService({});
|
||||
const stub = sinon.stub(service, 'sendForPost').resolves();
|
||||
let callback;
|
||||
@ -37,7 +37,7 @@ describe('MentionSendingService', function () {
|
||||
})
|
||||
};
|
||||
service.listen(events);
|
||||
sinon.assert.calledOnce(events.on);
|
||||
sinon.assert.calledThrice(events.on);
|
||||
await callback({});
|
||||
sinon.assert.calledOnce(stub);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user