mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
Added e2e test covering media inliner job start
refs https://github.com/TryGhost/Toolbox/issues/523 - The test is useful for future iterations of the response format and as a quick reference on which parameters the media inlining endpoint accepts.
This commit is contained in:
parent
38b356a748
commit
33316a6440
@ -84,4 +84,24 @@ describe('DB API', function () {
|
||||
eventsTriggered['post.deleted'].length.should.eql(7);
|
||||
eventsTriggered['tag.deleted'].length.should.eql(1);
|
||||
});
|
||||
|
||||
it('Can trigger external media inliner', async function () {
|
||||
const response = await request
|
||||
.post(localUtils.API.getApiQuery('db/media/inline'))
|
||||
.send({
|
||||
domains: ['https://example.com']
|
||||
})
|
||||
.set('Origin', config.get('url'))
|
||||
.set('Accept', 'application/json')
|
||||
.expect(200);
|
||||
|
||||
// @NOTE: the response format is temporary for test purposes
|
||||
// before feature graduates to GA, it should become
|
||||
// a more consistent format
|
||||
response.body.should.eql({
|
||||
db: [{
|
||||
status: 'success'
|
||||
}]
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user