0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Fixed failing unit test

refs 9bc5a279ca

- Adds a new post status introduced in the referenced commit.
This commit is contained in:
Naz 2021-08-13 10:22:11 +04:00
parent 0d7f253582
commit 70b359923f

View file

@ -1,7 +1,5 @@
const should = require('should'); const should = require('should');
const sinon = require('sinon');
const serializers = require('../../../../../../../core/server/api/canary/utils/serializers'); const serializers = require('../../../../../../../core/server/api/canary/utils/serializers');
const urlUtils = require('../../../../../../utils/urlUtils');
describe('Unit: canary/utils/serializers/input/posts', function () { describe('Unit: canary/utils/serializers/input/posts', function () {
describe('browse', function () { describe('browse', function () {
@ -36,7 +34,7 @@ describe('Unit: canary/utils/serializers/input/posts', function () {
}; };
serializers.input.posts.browse(apiConfig, frame); serializers.input.posts.browse(apiConfig, frame);
should.equal(frame.options.filter, '(type:post)+status:[draft,published,scheduled]'); should.equal(frame.options.filter, '(type:post)+status:[draft,published,scheduled,sent]');
}); });
it('combine filters', function () { it('combine filters', function () {
@ -179,7 +177,7 @@ describe('Unit: canary/utils/serializers/input/posts', function () {
}; };
serializers.input.posts.read(apiConfig, frame); serializers.input.posts.read(apiConfig, frame);
frame.options.filter.should.eql('(type:post)+status:[draft,published,scheduled]'); frame.options.filter.should.eql('(type:post)+status:[draft,published,scheduled,sent]');
}); });
it('with apiType of "admin" it forces type:post filter & respects custom status filter', function () { it('with apiType of "admin" it forces type:post filter & respects custom status filter', function () {