mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 20:03:12 +03:00
Changed to use different fixtures during testing
- this keeps production and test fixtures separate, so that changing the prod fixtures doesn't change the shape of our tests. - we may still want to test that the production fixtures do what we expect, but that can be handled in a separate integration test, by specifically setting the fixture path
This commit is contained in:
parent
5ccc1914f5
commit
b781e47cb9
@ -1,5 +1,8 @@
|
|||||||
const FixtureManager = require('./fixture-manager');
|
const FixtureManager = require('./fixture-manager');
|
||||||
const fixtures = require('./fixtures');
|
const config = require('../../../../shared/config');
|
||||||
|
|
||||||
|
const fixturePath = config.get('paths').fixtures;
|
||||||
|
const fixtures = require(fixturePath);
|
||||||
|
|
||||||
module.exports.FixtureManager = FixtureManager;
|
module.exports.FixtureManager = FixtureManager;
|
||||||
module.exports.fixtureManager = new FixtureManager(fixtures);
|
module.exports.fixtureManager = new FixtureManager(fixtures);
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
"privacy": false,
|
"privacy": false,
|
||||||
"useMinFiles": true,
|
"useMinFiles": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"contentPath": "content/"
|
"contentPath": "content/",
|
||||||
|
"fixtures": "core/server/data/schema/fixtures/fixtures"
|
||||||
},
|
},
|
||||||
"adapters": {
|
"adapters": {
|
||||||
"sso": {
|
"sso": {
|
||||||
|
5
core/shared/config/env/config.testing.json
vendored
5
core/shared/config/env/config.testing.json
vendored
@ -49,5 +49,8 @@
|
|||||||
"useTinfoil": true,
|
"useTinfoil": true,
|
||||||
"useStructuredData": true
|
"useStructuredData": true
|
||||||
},
|
},
|
||||||
"useMinFiles": false
|
"useMinFiles": false,
|
||||||
|
"paths": {
|
||||||
|
"fixtures": "test/utils/fixtures/fixtures"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,7 @@ describe('Config Loader', function () {
|
|||||||
// and it doesn't make sure to check for "extra" keys
|
// and it doesn't make sure to check for "extra" keys
|
||||||
Object.keys(pathConfig).should.eql([
|
Object.keys(pathConfig).should.eql([
|
||||||
'contentPath',
|
'contentPath',
|
||||||
|
'fixtures',
|
||||||
'appRoot',
|
'appRoot',
|
||||||
'corePath',
|
'corePath',
|
||||||
'clientAssets',
|
'clientAssets',
|
||||||
|
Loading…
Reference in New Issue
Block a user