From ed5598a59fe7ffd72e33f1971a76c5bf4ebc1137 Mon Sep 17 00:00:00 2001 From: Stephen Adamson Date: Sun, 22 Feb 2026 00:31:04 +0000 Subject: [PATCH] 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 --- backend/handlers/scheduling/scheduling_test.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/backend/handlers/scheduling/scheduling_test.go b/backend/handlers/scheduling/scheduling_test.go index 99cf07e..bb702ac 100644 --- a/backend/handlers/scheduling/scheduling_test.go +++ b/backend/handlers/scheduling/scheduling_test.go @@ -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) } }