From 382d2dbe94d663d04e594d8e7391a9e90c0367b4 Mon Sep 17 00:00:00 2001 From: Naz Date: Mon, 15 Nov 2021 19:56:28 +0400 Subject: [PATCH] Added missing router identified parameter in tests refs https://github.com/TryGhost/Ghost/commit/042618fe930a3b3bc563b65347d99efd46c39cc8 - The newly introduced identified were expected in the UrlService's intergration tests to fit new method signature --- test/integration/url_service.test.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/test/integration/url_service.test.js b/test/integration/url_service.test.js index a7aed3bb9c..d795d31523 100644 --- a/test/integration/url_service.test.js +++ b/test/integration/url_service.test.js @@ -33,10 +33,10 @@ describe('Integration: services/url/UrlService', function () { before(function (done) { urlService = new UrlService(); - urlService.onRouterAddedType('featured:false', 'posts', '/:slug/'); - urlService.onRouterAddedType(null, 'authors', '/author/:slug/'); - urlService.onRouterAddedType(null, 'tags', '/tag/:slug/'); - urlService.onRouterAddedType(null, 'pages', '/:slug/'); + urlService.onRouterAddedType('unique-id-1', 'featured:false', 'posts', '/:slug/'); + urlService.onRouterAddedType('unique-id-2', null, 'authors', '/author/:slug/'); + urlService.onRouterAddedType('unique-id-3', null, 'tags', '/tag/:slug/'); + urlService.onRouterAddedType('unique-id-4', null, 'pages', '/:slug/'); // We can't use our url service utils here, because this is a local copy of the urlService, not the singletone urlService.init(); @@ -133,11 +133,11 @@ describe('Integration: services/url/UrlService', function () { before(function (done) { urlService = new UrlService(); - urlService.onRouterAddedType('featured:true', 'posts', '/podcast/:slug/'); - urlService.onRouterAddedType('page:false', 'posts', '/collection/:year/:slug/'); - urlService.onRouterAddedType(null, 'authors', '/persons/:slug/'); - urlService.onRouterAddedType(null, 'tags', '/category/:slug/'); - urlService.onRouterAddedType(null, 'pages', '/:slug/'); + urlService.onRouterAddedType('unique-id-1', 'featured:true', 'posts', '/podcast/:slug/'); + urlService.onRouterAddedType('unique-id-2', 'page:false', 'posts', '/collection/:year/:slug/'); + urlService.onRouterAddedType('unique-id-3', null, 'authors', '/persons/:slug/'); + urlService.onRouterAddedType('unique-id-4', null, 'tags', '/category/:slug/'); + urlService.onRouterAddedType('unique-id-5', null, 'pages', '/:slug/'); // We can't use our url service utils here, because this is a local copy of the urlService, not the singletone urlService.init(); @@ -226,11 +226,11 @@ describe('Integration: services/url/UrlService', function () { urlService = new UrlService(); - urlService.onRouterAddedType('featured:false', 'posts', '/collection/:year/:slug/'); - urlService.onRouterAddedType('featured:true', 'posts', '/podcast/:slug/'); - urlService.onRouterAddedType(null, 'authors', '/persons/:slug/'); - urlService.onRouterAddedType(null, 'tags', '/category/:slug/'); - urlService.onRouterAddedType(null, 'pages', '/:slug/'); + urlService.onRouterAddedType('unique-id-1', 'featured:false', 'posts', '/collection/:year/:slug/'); + urlService.onRouterAddedType('unique-id-2', 'featured:true', 'posts', '/podcast/:slug/'); + urlService.onRouterAddedType('unique-id-3', null, 'authors', '/persons/:slug/'); + urlService.onRouterAddedType('unique-id-4', null, 'tags', '/category/:slug/'); + urlService.onRouterAddedType('unique-id-5', null, 'pages', '/:slug/'); // We can't use our url service utils here, because this is a local copy of the urlService, not the singletone urlService.init();