mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Force start in email route tests to pick up stubbed API
refs: https://github.com/TryGhost/Toolbox/issues/130 The API version stays at v2 unless we stub the getFrontendApiVersion method. But stubbing the method doesn't get picked up unless we actually restart Ghost. TODO: Maybe change the default here so we don't need to restart Ghost just to test the current version's API
This commit is contained in:
parent
b70ad5b170
commit
d4e0ae14f1
1 changed files with 4 additions and 4 deletions
|
@ -7,9 +7,9 @@ const sinon = require('sinon');
|
|||
const supertest = require('supertest');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
const testUtils = require('../../utils');
|
||||
const config = require('../../../core/shared/config');
|
||||
const bridge = require('../../../core/bridge');
|
||||
const testUtils = require('../utils');
|
||||
const config = require('../../core/shared/config');
|
||||
const bridge = require('../../core/bridge');
|
||||
|
||||
describe('Frontend Routing: Email Routes', function () {
|
||||
let request;
|
||||
|
@ -19,7 +19,7 @@ describe('Frontend Routing: Email Routes', function () {
|
|||
sinon.stub(bridge, 'getFrontendApiVersion')
|
||||
.returns('v4');
|
||||
|
||||
await testUtils.startGhost();
|
||||
await testUtils.startGhost({forceStart: true});
|
||||
|
||||
request = supertest.agent(config.get('url'));
|
||||
|
Loading…
Add table
Reference in a new issue