Skip to content

Commit

Permalink
Updated media e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sagzy committed Jan 30, 2025
1 parent c570201 commit c7b2bc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ghost/core/test/e2e-api/admin/media.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ describe('Media API', function () {
.attach('file', path.join(__dirname, '/../../utils/fixtures/images/ghosticon.jpg'))
.expect(200);

const thumbnailUrl = res.body.media[0].url.replace('.mp4', '_thumb.jpg');
thumbnailRes.body.media[0].url.should.equal(thumbnailUrl);
const mediaUrlWithoutExt = res.body.media[0].url.replace('.mp4', '');
thumbnailRes.body.media[0].url.should.match(new RegExp(`${mediaUrlWithoutExt}_thumb-\\w{16}\\.jpg`));
thumbnailRes.body.media[0].ref.should.equal('updated_thumbnail_2');

media.push(thumbnailRes.body.media[0].url.replace(config.get('url'), ''));
Expand Down

0 comments on commit c7b2bc4

Please sign in to comment.