0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Fixed unit tests

This commit is contained in:
Fabien "egg" O'Carroll 2023-04-17 16:52:51 +01:00
parent ff082c1934
commit b41897a2b4

View file

@ -93,7 +93,7 @@ describe('PostRevisions', function () {
assert.deepEqual(actual, expected); assert.deepEqual(actual, expected);
}); });
it('returns two revisions when there are no existing revisions', async function () { it('returns one revisions when there are no existing revisions', async function () {
const postRevisions = new PostRevisions({config}); const postRevisions = new PostRevisions({config});
const actual = await postRevisions.getRevisions({ const actual = await postRevisions.getRevisions({
@ -106,9 +106,8 @@ describe('PostRevisions', function () {
html: 'current' html: 'current'
}, []); }, []);
assert.equal(actual.length, 2); assert.equal(actual.length, 1);
assert.equal(actual[0].lexical, 'previous'); assert.equal(actual[0].lexical, 'current');
assert.equal(actual[1].lexical, 'current');
}); });
it('limits the number of revisions to the max_revisions count', async function () { it('limits the number of revisions to the max_revisions count', async function () {