Prevented .well-known file tests from attempting to send mail

refs: https://github.com/TryGhost/Toolbox/issues/389

These tests would log errors while attempting to send email.
This commit is contained in:
Sam Lord 2023-03-03 13:52:50 +00:00
parent 5b2adbe4c5
commit cd5aca7227
2 changed files with 12 additions and 2 deletions

View File

@ -1,4 +1,4 @@
const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-framework');
const {agentProvider, fixtureManager, matchers, mockManager} = require('../../utils/e2e-framework');
const {anyString, anyEtag} = matchers;
describe('Members .well-known', function () {
@ -7,6 +7,11 @@ describe('Members .well-known', function () {
before(async function () {
const agents = await agentProvider.getAgentsForMembers();
membersAgent = agents.membersAgent;
mockManager.mockMail();
});
after(function () {
mockManager.restore();
});
describe('GET /jwks.json', function () {

View File

@ -1,13 +1,18 @@
const {agentProvider, matchers} = require('../utils/e2e-framework');
const {agentProvider, matchers, mockManager} = require('../utils/e2e-framework');
const {anyString, anyEtag} = matchers;
describe('.well-known', function () {
let agentGhostAPI;
before(async function () {
mockManager.mockMail();
agentGhostAPI = await agentProvider.getGhostAPIAgent();
});
after(function () {
mockManager.restore();
});
describe('GET /jwks.json', function () {
it('should return a JWKS', async function () {
await agentGhostAPI