mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Updated export fixture for Ghost 3.0
refs https://github.com/TryGhost/Team/issues/555 - This test fixure is up to date and contains real export from Ghost 3.0. Previous file was just an old 2.x export file which was updated manually on "as needed bases" - The aim is to keep these files as close to real world as possible instead of manually making up data for the needs of test suites - Fixed test suite which was using the v3 export file
This commit is contained in:
parent
7015894e3a
commit
3240d4adf0
2 changed files with 2729 additions and 2543 deletions
|
@ -12,7 +12,8 @@ describe('DB API', function () {
|
|||
let request;
|
||||
let eventsTriggered;
|
||||
|
||||
before(async function () {
|
||||
// NOTE: has to be beforeEach otherwise imports overlap and cause duplicate entry errors
|
||||
beforeEach(async function () {
|
||||
await testUtils.startGhost();
|
||||
request = supertest.agent(config.get('url'));
|
||||
await localUtils.doAuth(request);
|
||||
|
@ -31,6 +32,7 @@ describe('DB API', function () {
|
|||
});
|
||||
|
||||
afterEach(function () {
|
||||
testUtils.stopGhost();
|
||||
sinon.restore();
|
||||
});
|
||||
|
||||
|
@ -56,7 +58,7 @@ describe('DB API', function () {
|
|||
jsonResponse.db[0].data.should.have.only.keys(...dataKeys);
|
||||
});
|
||||
|
||||
it('Can import a JSON database exported from Ghost v2', async function () {
|
||||
it('Can import a JSON database exported from Ghost 2.0', async function () {
|
||||
await request.delete(localUtils.API.getApiQuery('db/'))
|
||||
.set('Origin', config.get('url'))
|
||||
.set('Accept', 'application/json')
|
||||
|
@ -83,7 +85,7 @@ describe('DB API', function () {
|
|||
res2.body.posts.should.have.length(7);
|
||||
});
|
||||
|
||||
it('Can import a JSON database exported from Ghost v3', async function () {
|
||||
it('Can import a JSON database exported from Ghost 3.0', async function () {
|
||||
await request.delete(localUtils.API.getApiQuery('db/'))
|
||||
.set('Origin', config.get('url'))
|
||||
.set('Accept', 'application/json')
|
||||
|
@ -99,7 +101,7 @@ describe('DB API', function () {
|
|||
const jsonResponse = res.body;
|
||||
should.exist(jsonResponse.db);
|
||||
should.exist(jsonResponse.problems);
|
||||
jsonResponse.problems.should.have.length(3);
|
||||
jsonResponse.problems.should.have.length(2);
|
||||
|
||||
const res2 = await request.get(localUtils.API.getApiQuery('posts/'))
|
||||
.set('Origin', config.get('url'))
|
||||
|
@ -110,7 +112,7 @@ describe('DB API', function () {
|
|||
res2.body.posts.should.have.length(7);
|
||||
});
|
||||
|
||||
it('Can import a JSON database exported from Ghost v4', async function () {
|
||||
it('Can import a JSON database exported from Ghost 4.0', async function () {
|
||||
await request.delete(localUtils.API.getApiQuery('db/'))
|
||||
.set('Origin', config.get('url'))
|
||||
.set('Accept', 'application/json')
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue