fix: calc worktime, when nothing is set
Some checks failed
Tests / Run Go Tests (push) Failing after 1m32s
Some checks failed
Tests / Run Go Tests (push) Failing after 1m32s
This commit is contained in:
@@ -13,35 +13,35 @@ var testBookingType = models.BookingType{
|
||||
var testBookings8hrs = []models.Booking{{
|
||||
CardUID: "aaaa-aaaa",
|
||||
CheckInOut: 1,
|
||||
Timestamp: CatchError(time.Parse("2006-01-02 15:04", "2025-01-01 08:00")),
|
||||
Timestamp: time.Date(2025, 01, 01, 8, 0, 0, 0, time.UTC),
|
||||
BookingType: testBookingType,
|
||||
}, {
|
||||
CardUID: "aaaa-aaaa",
|
||||
CheckInOut: 2,
|
||||
Timestamp: CatchError(time.Parse("2006-01-02 15:04", "2025-01-01 16:00")),
|
||||
Timestamp: time.Date(2025, 01, 01, 16, 0, 0, 0, time.UTC),
|
||||
BookingType: testBookingType,
|
||||
}}
|
||||
|
||||
var testBookings6hrs = []models.Booking{{
|
||||
CardUID: "aaaa-aaaa",
|
||||
CheckInOut: 1,
|
||||
Timestamp: CatchError(time.Parse("2006-01-02 15:04", "2025-01-01 08:00")),
|
||||
Timestamp: time.Date(2025, 01, 01, 8, 0, 0, 0, time.UTC),
|
||||
BookingType: testBookingType,
|
||||
}, {
|
||||
CardUID: "aaaa-aaaa",
|
||||
CheckInOut: 2,
|
||||
Timestamp: CatchError(time.Parse("2006-01-02 15:04", "2025-01-01 14:00")),
|
||||
Timestamp: time.Date(2025, 01, 01, 14, 0, 0, 0, time.UTC),
|
||||
BookingType: testBookingType,
|
||||
}}
|
||||
|
||||
var testBookings10hrs = []models.Booking{{
|
||||
CardUID: "aaaa-aaaa",
|
||||
CheckInOut: 1,
|
||||
Timestamp: CatchError(time.Parse("2006-01-02 15:04", "2025-01-01 08:00")),
|
||||
Timestamp: time.Date(2025, 01, 01, 8, 0, 0, 0, time.UTC),
|
||||
BookingType: testBookingType,
|
||||
}, {
|
||||
CardUID: "aaaa-aaaa",
|
||||
CheckInOut: 2,
|
||||
Timestamp: CatchError(time.Parse("2006-01-02 15:04", "2025-01-01 18:00")),
|
||||
Timestamp: time.Date(2025, 01, 01, 18, 0, 0, 0, time.UTC),
|
||||
BookingType: testBookingType,
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user