mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03: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,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…
Reference in New Issue
Block a user