diff --git a/modules/worker/front/calendar/index.spec.js b/modules/worker/front/calendar/index.spec.js index 97ea897878..6b5025dae4 100644 --- a/modules/worker/front/calendar/index.spec.js +++ b/modules/worker/front/calendar/index.spec.js @@ -22,6 +22,22 @@ describe('Worker', () => { controller._worker = {id: 106}; })); + describe('year() getter', () => { + it(`should return the year number of the calendar date`, () => { + expect(controller.year).toEqual(year); + }); + }); + + describe('year() setter', () => { + it(`should set the year of the calendar date`, () => { + const previousYear = year - 1; + controller.year = previousYear; + + expect(controller.year).toEqual(previousYear); + expect(controller.date.getFullYear()).toEqual(previousYear); + }); + }); + describe('started property', () => { it(`should return first day and month of current year`, () => { let started = new Date(year, 0, 1);