mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 05:37:34 +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;
|
||||
const API_VERSION = 'canary';
|
||||
|
||||
before(function () {
|
||||
return ghost()
|
||||
.then(function () {
|
||||
request = supertest.agent(config.get('url'));
|
||||
})
|
||||
.then(function () {
|
||||
return localUtils.doAuth(request, 'api_keys', 'webhooks');
|
||||
});
|
||||
before(async function () {
|
||||
await ghost();
|
||||
|
||||
request = supertest.agent(config.get('url'));
|
||||
|
||||
await localUtils.doAuth(request, 'integrations', 'api_keys', 'webhooks');
|
||||
});
|
||||
|
||||
it('Can create a webhook using integration', function () {
|
||||
|
@ -10,14 +10,12 @@ describe('Webhooks API (v2)', function () {
|
||||
let request;
|
||||
const API_VERSION = 'v2';
|
||||
|
||||
before(function () {
|
||||
return ghost()
|
||||
.then(function () {
|
||||
request = supertest.agent(config.get('url'));
|
||||
})
|
||||
.then(function () {
|
||||
return localUtils.doAuth(request, 'api_keys', 'webhooks');
|
||||
});
|
||||
before(async function () {
|
||||
await ghost();
|
||||
|
||||
request = supertest.agent(config.get('url'));
|
||||
|
||||
await localUtils.doAuth(request, 'integrations', 'api_keys', 'webhooks');
|
||||
});
|
||||
|
||||
it('Can create a webhook using integration', function () {
|
||||
|
@ -10,14 +10,12 @@ describe('Webhooks API (v3)', function () {
|
||||
let request;
|
||||
const API_VERSION = 'v3';
|
||||
|
||||
before(function () {
|
||||
return ghost()
|
||||
.then(function () {
|
||||
request = supertest.agent(config.get('url'));
|
||||
})
|
||||
.then(function () {
|
||||
return localUtils.doAuth(request, 'api_keys', 'webhooks');
|
||||
});
|
||||
before(async function () {
|
||||
await ghost();
|
||||
|
||||
request = supertest.agent(config.get('url'));
|
||||
|
||||
await localUtils.doAuth(request, 'integrations', 'api_keys', 'webhooks');
|
||||
});
|
||||
|
||||
it('Can create a webhook using integration', function () {
|
||||
|
Loading…
Reference in New Issue
Block a user