fixed #61, #62 refactored getTime variants
Some checks failed
Tests / Run Go Tests (push) Failing after 1m20s

This commit is contained in:
2025-12-12 12:26:40 +01:00
parent 1ccc19b85c
commit 76b23133d0
10 changed files with 196 additions and 207 deletions

View File

@@ -52,7 +52,7 @@ func TestCalcRealWorkTimeDayAbsence(t *testing.T) {
t.Run("Calc Absence Worktime: "+tc.absenceType.Name, func(t *testing.T) {
var testCase = testAbsence
testCase.AbwesenheitTyp = tc.absenceType
workTime := testCase.GetWorktimeReal(testUser, models.WorktimeBaseDay)
workTime := testCase.GetWorktime(testUser, models.WorktimeBaseDay, false)
if workTime != tc.expectedTime {
t.Errorf("Calc Worktime Default not working, time should be %s, but was %s", helper.FormatDurationFill(tc.expectedTime, true), helper.FormatDurationFill(workTime, true))
}
@@ -83,7 +83,7 @@ func TestCalcRealWorkTimeWeekAbsence(t *testing.T) {
t.Run("Calc Absence Worktime: "+tc.absenceType.Name, func(t *testing.T) {
var testCase = testAbsence
testCase.AbwesenheitTyp = tc.absenceType
workTime := testCase.GetWorktimeReal(testUser, models.WorktimeBaseWeek)
workTime := testCase.GetWorktime(testUser, models.WorktimeBaseWeek, false)
if workTime != tc.expectedTime {
t.Errorf("Calc Worktime Default not working, time should be %s, but was %s", helper.FormatDurationFill(tc.expectedTime, true), helper.FormatDurationFill(workTime, true))
}