removed and refactored virtual and real worktime
This commit is contained in:
@@ -49,7 +49,7 @@ func TestWorkdayWorktimeDay(t *testing.T) {
|
||||
t.Run("Calc Absence Worktime: "+tc.testName, func(t *testing.T) {
|
||||
var testCase = testWorkDay
|
||||
testCase.Bookings = tc.bookings
|
||||
workTime := testCase.GetWorktimeReal(testUser, models.WorktimeBaseDay)
|
||||
workTime := testCase.GetWorktime(testUser, models.WorktimeBaseDay, false)
|
||||
if workTime != tc.expectedTime {
|
||||
t.Errorf("GetWorktimeReal not working, time should be %s, but was %s", helper.FormatDurationFill(tc.expectedTime, true), helper.FormatDurationFill(workTime, true))
|
||||
}
|
||||
@@ -84,7 +84,7 @@ func TestWorkdayWorktimeWeek(t *testing.T) {
|
||||
t.Run("Calc Absence Worktime: "+tc.testName, func(t *testing.T) {
|
||||
var testCase = testWorkDay
|
||||
testCase.Bookings = tc.bookings
|
||||
workTime := testCase.GetWorktimeReal(testUser, models.WorktimeBaseWeek)
|
||||
workTime := testCase.GetWorktime(testUser, models.WorktimeBaseWeek, false)
|
||||
if workTime != tc.expectedTime {
|
||||
t.Errorf("GetWorktimeReal not working, time should be %s, but was %s", helper.FormatDurationFill(tc.expectedTime, true), helper.FormatDurationFill(workTime, true))
|
||||
}
|
||||
@@ -119,7 +119,7 @@ func TestWorkdayPausetimeDay(t *testing.T) {
|
||||
t.Run("Calc Absence Worktime: "+tc.testName, func(t *testing.T) {
|
||||
var testCase = testWorkDay
|
||||
testCase.Bookings = tc.bookings
|
||||
workTime := testCase.GetPausetimeReal(testUser, models.WorktimeBaseDay)
|
||||
workTime := testCase.GetPausetime(testUser, models.WorktimeBaseDay, false)
|
||||
if workTime != tc.expectedTime {
|
||||
t.Errorf("GetPausetimeReal not working, time should be %s, but was %s", helper.FormatDurationFill(tc.expectedTime, true), helper.FormatDurationFill(workTime, true))
|
||||
}
|
||||
@@ -154,7 +154,7 @@ func TestWorkdayPausetimeWeek(t *testing.T) {
|
||||
t.Run("Calc Absence Worktime: "+tc.testName, func(t *testing.T) {
|
||||
var testCase = testWorkDay
|
||||
testCase.Bookings = tc.bookings
|
||||
workTime := testCase.GetPausetimeReal(testUser, models.WorktimeBaseWeek)
|
||||
workTime := testCase.GetPausetime(testUser, models.WorktimeBaseWeek, false)
|
||||
if workTime != tc.expectedTime {
|
||||
t.Errorf("GetPausetimeReal 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