diff --git a/modules/route/front/index/index.spec.js b/modules/route/front/index/index.spec.js index 05dd56433..c1f414d5e 100644 --- a/modules/route/front/index/index.spec.js +++ b/modules/route/front/index/index.spec.js @@ -44,17 +44,15 @@ describe('Component vnRouteIndex', () => { describe('showRouteReport()', () => { it('should call to the vnReport show method', () => { - controller.vnReport.show = jest.fn(); + jest.spyOn(window, 'open').mockReturnThis(); const data = controller.$.model.data; data[0].checked = true; data[2].checked = true; - const routeIds = '1,3'; - controller.showRouteReport(); - expect(controller.vnReport.show).toHaveBeenCalledWith(`Routes/${routeIds}/driver-route-pdf`); + expect(window.open).toHaveBeenCalled(); }); });