fix: frontTest
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
ea36c0deb5
commit
849f4e1a6d
|
@ -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