mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Removed models dependency from Webhook Service test
no issue - There's no need to init whole models module in this test. Simplified mocks are easier to understand without any "magic" that's going on behind model's module "init()" call
This commit is contained in:
parent
0139c9c3ad
commit
4dcb229b35
1 changed files with 6 additions and 3 deletions
|
@ -1,12 +1,15 @@
|
|||
const errors = require('@tryghost/errors');
|
||||
const should = require('should');
|
||||
const sinon = require('sinon');
|
||||
|
||||
const createWebhookService = require('../../../../../core/server/services/webhooks/webhooks-service');
|
||||
const models = require('../../../../../core/server/models');
|
||||
|
||||
describe('Webhook Service', function () {
|
||||
before(models.init);
|
||||
const models = {
|
||||
Webhook: {
|
||||
getByEventAndTarget: () => {},
|
||||
add: () => {}
|
||||
}
|
||||
};
|
||||
|
||||
afterEach(function () {
|
||||
sinon.restore();
|
||||
|
|
Loading…
Add table
Reference in a new issue