0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

🔥 Removed demo post (#9769)

refs #9742

- removed demo post fixture for fresh blogs
- added migration to remove the demo post from the database
- on rollback: bring back demo post
This commit is contained in:
Katharina Irrgang 2018-08-08 14:24:56 +02:00
parent 0379bc4bf9
commit 1caa941d20
5 changed files with 75 additions and 22 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -291,7 +291,7 @@ describe('Post API', function () {
var jsonResponse = res.body;
should.exist(jsonResponse.posts);
testUtils.API.checkResponse(jsonResponse, 'posts');
jsonResponse.posts.should.have.length(2);
jsonResponse.posts.should.have.length(1);
testUtils.API.checkResponse(jsonResponse.posts[0], 'post');
testUtils.API.checkResponse(jsonResponse.meta.pagination, 'pagination');
done();

View file

@ -106,11 +106,11 @@ describe('Migration Fixture Utils', function () {
fixtureUtils.addFixturesForModel(fixtures.models[5]).then(function (result) {
should.exist(result);
result.should.be.an.Object();
result.should.have.property('expected', 8);
result.should.have.property('done', 8);
result.should.have.property('expected', 7);
result.should.have.property('done', 7);
postOneStub.callCount.should.eql(8);
postAddStub.callCount.should.eql(8);
postOneStub.callCount.should.eql(7);
postAddStub.callCount.should.eql(7);
done();
}).catch(done);
@ -123,10 +123,10 @@ describe('Migration Fixture Utils', function () {
fixtureUtils.addFixturesForModel(fixtures.models[5]).then(function (result) {
should.exist(result);
result.should.be.an.Object();
result.should.have.property('expected', 8);
result.should.have.property('expected', 7);
result.should.have.property('done', 0);
postOneStub.callCount.should.eql(8);
postOneStub.callCount.should.eql(7);
postAddStub.callCount.should.eql(0);
done();

View file

@ -20,7 +20,7 @@ var should = require('should'),
describe('DB version integrity', function () {
// Only these variables should need updating
var currentSchemaHash = '22d24b1de23d118b90e9547fefae5ad7',
currentFixturesHash = '2d1a85ce4090ea59ffebce65cef0b9b6';
currentFixturesHash = '13417e5bd47bcadd5b806de028fdd7dc';
// If this test is failing, then it is likely a change has been made that requires a DB version bump,
// and the values above will need updating as confirmation