0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Cleaned up schedules test suite from author_id field

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

 - The `author_id` is ignored in the API of Ghost 5.0 and should not be used in the fixtures either
This commit is contained in:
Naz 2022-05-02 11:42:10 +08:00 committed by naz
parent d804366b44
commit 625f83af09

View file

@ -32,48 +32,58 @@ describe('Canary Schedules API', function () {
resources.push(testUtils.DataGenerator.forKnex.createPost({
created_by: testUtils.getExistingData().users[0].id,
author_id: testUtils.getExistingData().users[0].id,
published_by: testUtils.getExistingData().users[0].id,
published_at: moment().add(30, 'seconds').toDate(),
status: 'scheduled',
slug: 'first'
slug: 'first',
authors: [{
id: testUtils.getExistingData().users[0].id
}]
}));
resources.push(testUtils.DataGenerator.forKnex.createPost({
created_by: testUtils.getExistingData().users[0].id,
author_id: testUtils.getExistingData().users[0].id,
published_by: testUtils.getExistingData().users[0].id,
published_at: moment().subtract(30, 'seconds').toDate(),
status: 'scheduled',
slug: 'second'
slug: 'second',
authors: [{
id: testUtils.getExistingData().users[0].id
}]
}));
resources.push(testUtils.DataGenerator.forKnex.createPost({
created_by: testUtils.getExistingData().users[0].id,
author_id: testUtils.getExistingData().users[0].id,
published_by: testUtils.getExistingData().users[0].id,
published_at: moment().add(10, 'minute').toDate(),
status: 'scheduled',
slug: 'third'
slug: 'third',
authors: [{
id: testUtils.getExistingData().users[0].id
}]
}));
resources.push(testUtils.DataGenerator.forKnex.createPost({
created_by: testUtils.getExistingData().users[0].id,
author_id: testUtils.getExistingData().users[0].id,
published_by: testUtils.getExistingData().users[0].id,
published_at: moment().subtract(10, 'minute').toDate(),
status: 'scheduled',
slug: 'fourth'
slug: 'fourth',
authors: [{
id: testUtils.getExistingData().users[0].id
}]
}));
resources.push(testUtils.DataGenerator.forKnex.createPost({
created_by: testUtils.getExistingData().users[0].id,
author_id: testUtils.getExistingData().users[0].id,
published_by: testUtils.getExistingData().users[0].id,
published_at: moment().add(30, 'seconds').toDate(),
status: 'scheduled',
slug: 'fifth',
type: 'page'
type: 'page',
authors: [{
id: testUtils.getExistingData().users[0].id
}]
}));
const result = await Promise.mapSeries(resources, function (post) {