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:
Naz 2021-03-04 12:23:31 +13:00 committed by Thibaut Patel
parent cc0a655a3d
commit f57115d3cc
3 changed files with 18 additions and 24 deletions

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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 () {