mirror of
https://github.com/abhinavxd/libredesk.git
synced 2025-11-02 04:53:41 +00:00
Example test case for it.
```go
{
name: "Monday to Friday 10:00 to 18:00",
startTime: time.Date(2025, 03, 22, 18, 1, 43, 0, locIST), // Sat
// 24 hours.
slaMinutes: 1440,
businessHours: models.BusinessHours{
Hours: mustMarshalJSON(map[string]models.WorkingHours{
"Monday": {Open: "10:00", Close: "18:00"},
"Tuesday": {Open: "10:00", Close: "18:00"},
"Wednesday": {Open: "10:00", Close: "18:00"},
"Thursday": {Open: "10:00", Close: "18:00"},
"Friday": {Open: "10:00", Close: "18:00"},
"Saturday": {Open: "10:00", Close: "14:00"},
}),
},
timeZone: "Asia/Kolkata",
expectedResult: time.Date(2025, 03, 26, 18, 0, 0, 0, locIST),
},
```
fix: more validations for working hours.
chore: remove unused struct fields in working hours