From 6f99b39aa4a526b8a2c3619e02e5c89b6727fe7c Mon Sep 17 00:00:00 2001 From: Jimmy Jaramillo Date: Fri, 24 Jun 2022 10:57:27 -0500 Subject: [PATCH] fix: TTA-49 refactor test time range custom and entry effects --- .../time-range-custom/time-range-custom.component.spec.ts | 4 +++- src/app/modules/time-clock/store/entry.effects.spec.ts | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/modules/reports/components/time-range-custom/time-range-custom.component.spec.ts b/src/app/modules/reports/components/time-range-custom/time-range-custom.component.spec.ts index 91091d0d3..3fad6305f 100644 --- a/src/app/modules/reports/components/time-range-custom/time-range-custom.component.spec.ts +++ b/src/app/modules/reports/components/time-range-custom/time-range-custom.component.spec.ts @@ -14,7 +14,9 @@ describe('TimeRangeCustomComponent', () => { let fixture: ComponentFixture; let store: MockStore; const toastrServiceStub = { - error: () => {} + error: () => { + return 'test error'; + } }; const timeEntry = { diff --git a/src/app/modules/time-clock/store/entry.effects.spec.ts b/src/app/modules/time-clock/store/entry.effects.spec.ts index 295ff75fd..562f68269 100644 --- a/src/app/modules/time-clock/store/entry.effects.spec.ts +++ b/src/app/modules/time-clock/store/entry.effects.spec.ts @@ -23,9 +23,7 @@ describe('TimeEntryActionEffects', () => { const entry: Entry = { project_id: 'p-id', start_date: new Date(), id: 'id' }; const dateTest = moment().format('YYYY-MM-DD'); - const endHourTest = moment().subtract(5, 'hours').format('HH:mm:ss'); const startHourTest = moment().subtract(3, 'hours').format('HH:mm:ss'); - const endDateTest = new Date(`${dateTest}T${endHourTest.trim()}`); const startDateTest = new Date(`${dateTest}T${startHourTest.trim()}`); const entryUpdate = {