feat(route_tickets): update frontTest
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2021-11-22 13:28:12 +01:00
parent fb6e443f03
commit a5ba02e2ec
1 changed files with 4 additions and 0 deletions

View File

@ -197,6 +197,9 @@ describe('Route', () => {
describe('setTicketsRoute()', () => {
it('should perform a POST query to add tickets to the route', () => {
controller.$.possibleTicketsDialog = {hide: () => {}};
jest.spyOn(controller.$.possibleTicketsDialog, 'hide');
controller.$params = {id: 1101};
controller.$.model.data = [{id: 1, checked: false}];
@ -223,6 +226,7 @@ describe('Route', () => {
$httpBackend.flush();
expect(controller.$.model.data).toEqual(expectedResult);
expect(controller.$.possibleTicketsDialog.hide).toHaveBeenCalledWith();
});
});