fix: frontTest
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2023-01-17 14:24:04 +01:00
parent ea36c0deb5
commit 849f4e1a6d
1 changed files with 2 additions and 4 deletions

View File

@ -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();
});
});