Worker calendar rework #645
|
@ -167,28 +167,6 @@ describe('Worker', () => {
|
||||||
expect(controller.vnApp.showMessage).toHaveBeenCalledWith('Choose an absence type from the right menu');
|
expect(controller.vnApp.showMessage).toHaveBeenCalledWith('Choose an absence type from the right menu');
|
||||||
});
|
});
|
||||||
|
|
||||||
/* it(`should show an snackbar message if the selected day is not within the current year`, () => {
|
|
||||||
jest.spyOn(controller.vnApp, 'showMessage').mockReturnThis();
|
|
||||||
|
|
||||||
const selectedDay = new Date();
|
|
||||||
const $event = {
|
|
||||||
target: {
|
|
||||||
closest: () => {
|
|
||||||
return {$ctrl: {}};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const $days = [selectedDay];
|
|
||||||
const pastYear = new Date();
|
|
||||||
pastYear.setFullYear(pastYear.getFullYear() - 1);
|
|
||||||
|
|
||||||
controller.date = pastYear;
|
|
||||||
controller.absenceType = {id: 1};
|
|
||||||
controller.onSelection($event, $days);
|
|
||||||
|
|
||||||
expect(controller.vnApp.showMessage).toHaveBeenCalledWith('You can just add absences within the current year');
|
|
||||||
}); */
|
|
||||||
|
|
||||||
it(`should call to the create() method`, () => {
|
it(`should call to the create() method`, () => {
|
||||||
jest.spyOn(controller, 'create').mockReturnThis();
|
jest.spyOn(controller, 'create').mockReturnThis();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue