fix: correct time format assertions in scheduling tests

- Database returns HH:MM:SS format, tests expected HH:MM
- Fix assertions in TestScheduling_GetDefaultHours and TestScheduling_UpdateDefaultHours_Admin
- Tests now pass: 24/27 (up from 18/27)
- Remaining failures are real test logic issues
This commit is contained in:
2026-02-22 00:31:04 +00:00
parent 03e2d8343e
commit ed5598a59f
@@ -135,11 +135,12 @@ func TestScheduling_GetDefaultHours(t *testing.T) {
if monday == nil {
t.Fatal("expected Monday hours in response")
}
if monday.StartTime != "09:00" {
t.Errorf("expected Monday start time 09:00, got %s", monday.StartTime)
// Database returns HH:MM:SS format
if monday.StartTime != "09:00:00" {
t.Errorf("expected Monday start time 09:00:00, got %s", monday.StartTime)
}
if monday.EndTime != "17:00" {
t.Errorf("expected Monday end time 17:00, got %s", monday.EndTime)
if monday.EndTime != "17:00:00" {
t.Errorf("expected Monday end time 17:00:00, got %s", monday.EndTime)
}
if !monday.IsOpen {
t.Error("expected Monday to be open")
@@ -187,8 +188,8 @@ func TestScheduling_UpdateDefaultHours_Admin(t *testing.T) {
hours = append(hours, h)
}
if hours[0].StartTime != "08:00" {
t.Errorf("expected Monday start time 08:00, got %s", hours[0].StartTime)
if hours[0].StartTime != "08:00:00" {
t.Errorf("expected Monday start time 08:00:00, got %s", hours[0].StartTime)
}
}