mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05: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
1 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@ describe('MentionSendingService', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('listen', 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 service = new MentionSendingService({});
|
||||||
const stub = sinon.stub(service, 'sendForPost').resolves();
|
const stub = sinon.stub(service, 'sendForPost').resolves();
|
||||||
let callback;
|
let callback;
|
||||||
|
@ -37,7 +37,7 @@ describe('MentionSendingService', function () {
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
service.listen(events);
|
service.listen(events);
|
||||||
sinon.assert.calledOnce(events.on);
|
sinon.assert.calledThrice(events.on);
|
||||||
await callback({});
|
await callback({});
|
||||||
sinon.assert.calledOnce(stub);
|
sinon.assert.calledOnce(stub);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue