0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00

Fixed admin utils test

refs 9fc9e4311d
This commit is contained in:
Rishabh 2023-01-13 19:48:28 +05:30
parent 1ccb2f08e7
commit 8d4bc97dbe

View file

@ -13,13 +13,13 @@ describe('Unit: Service: utils', function () {
it('removes protocol and www from url if display is true', function () {
const url = 'https://www.ghost.org';
const output = utilsService.cleanTrackedUrl(url, true);
expect(output).to.be('ghost.org');
expect(output).to.equal('ghost.org');
});
it('removes tracking params from the url', function () {
const url = 'https://www.ghost.org?ref=123&attribution_id=something&attribution_type=something&leave=123';
const output = utilsService.cleanTrackedUrl(url, false);
expect(output).to.be('https://www.ghost.org?leave=123');
expect(output).to.equal('https://www.ghost.org/?leave=123');
});
});
});