4860-route.index_downloadZip #1259
|
@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue