fixed #61, #62 refactored getTime variants
Some checks failed
Tests / Run Go Tests (push) Failing after 1m20s
Some checks failed
Tests / Run Go Tests (push) Failing after 1m20s
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user