mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 21:40:39 +03:00
Fixed fixture creation order in webhooks tests
- The tests need to have 'integrations' as a first fixture created so that webhooks can relate to an integration
This commit is contained in:
parent
cc0a655a3d
commit
f57115d3cc
@ -10,14 +10,12 @@ describe('Webhooks API (canary)', function () {
|
|||||||
let request;
|
let request;
|
||||||
const API_VERSION = 'canary';
|
const API_VERSION = 'canary';
|
||||||
|
|
||||||
before(function () {
|
before(async function () {
|
||||||
return ghost()
|
await ghost();
|
||||||
.then(function () {
|
|
||||||
request = supertest.agent(config.get('url'));
|
request = supertest.agent(config.get('url'));
|
||||||
})
|
|
||||||
.then(function () {
|
await localUtils.doAuth(request, 'integrations', 'api_keys', 'webhooks');
|
||||||
return localUtils.doAuth(request, 'api_keys', 'webhooks');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Can create a webhook using integration', function () {
|
it('Can create a webhook using integration', function () {
|
||||||
|
@ -10,14 +10,12 @@ describe('Webhooks API (v2)', function () {
|
|||||||
let request;
|
let request;
|
||||||
const API_VERSION = 'v2';
|
const API_VERSION = 'v2';
|
||||||
|
|
||||||
before(function () {
|
before(async function () {
|
||||||
return ghost()
|
await ghost();
|
||||||
.then(function () {
|
|
||||||
request = supertest.agent(config.get('url'));
|
request = supertest.agent(config.get('url'));
|
||||||
})
|
|
||||||
.then(function () {
|
await localUtils.doAuth(request, 'integrations', 'api_keys', 'webhooks');
|
||||||
return localUtils.doAuth(request, 'api_keys', 'webhooks');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Can create a webhook using integration', function () {
|
it('Can create a webhook using integration', function () {
|
||||||
|
@ -10,14 +10,12 @@ describe('Webhooks API (v3)', function () {
|
|||||||
let request;
|
let request;
|
||||||
const API_VERSION = 'v3';
|
const API_VERSION = 'v3';
|
||||||
|
|
||||||
before(function () {
|
before(async function () {
|
||||||
return ghost()
|
await ghost();
|
||||||
.then(function () {
|
|
||||||
request = supertest.agent(config.get('url'));
|
request = supertest.agent(config.get('url'));
|
||||||
})
|
|
||||||
.then(function () {
|
await localUtils.doAuth(request, 'integrations', 'api_keys', 'webhooks');
|
||||||
return localUtils.doAuth(request, 'api_keys', 'webhooks');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Can create a webhook using integration', function () {
|
it('Can create a webhook using integration', function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user