48 lines
1.3 KiB
Go
48 lines
1.3 KiB
Go
package models_test
|
|
|
|
import (
|
|
"arbeitszeitmessung/models"
|
|
"time"
|
|
)
|
|
|
|
var testBookingType = models.BookingType{
|
|
Id: 1,
|
|
Name: "Büro",
|
|
}
|
|
|
|
var testBookings8hrs = []models.Booking{models.Booking{
|
|
CardUID: "aaaa-aaaa",
|
|
CheckInOut: 1,
|
|
Timestamp: CatchError(time.Parse("2006-01-02 15:04", "2025-01-01 08:00")),
|
|
BookingType: testBookingType,
|
|
}, models.Booking{
|
|
CardUID: "aaaa-aaaa",
|
|
CheckInOut: 2,
|
|
Timestamp: CatchError(time.Parse("2006-01-02 15:04", "2025-01-01 16:00")),
|
|
BookingType: testBookingType,
|
|
}}
|
|
|
|
var testBookings6hrs = []models.Booking{models.Booking{
|
|
CardUID: "aaaa-aaaa",
|
|
CheckInOut: 1,
|
|
Timestamp: CatchError(time.Parse("2006-01-02 15:04", "2025-01-01 08:00")),
|
|
BookingType: testBookingType,
|
|
}, models.Booking{
|
|
CardUID: "aaaa-aaaa",
|
|
CheckInOut: 2,
|
|
Timestamp: CatchError(time.Parse("2006-01-02 15:04", "2025-01-01 14:00")),
|
|
BookingType: testBookingType,
|
|
}}
|
|
|
|
var testBookings10hrs = []models.Booking{models.Booking{
|
|
CardUID: "aaaa-aaaa",
|
|
CheckInOut: 1,
|
|
Timestamp: CatchError(time.Parse("2006-01-02 15:04", "2025-01-01 08:00")),
|
|
BookingType: testBookingType,
|
|
}, models.Booking{
|
|
CardUID: "aaaa-aaaa",
|
|
CheckInOut: 2,
|
|
Timestamp: CatchError(time.Parse("2006-01-02 15:04", "2025-01-01 18:00")),
|
|
BookingType: testBookingType,
|
|
}}
|