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:
@@ -135,11 +135,12 @@ func TestScheduling_GetDefaultHours(t *testing.T) {
|
|||||||
if monday == nil {
|
if monday == nil {
|
||||||
t.Fatal("expected Monday hours in response")
|
t.Fatal("expected Monday hours in response")
|
||||||
}
|
}
|
||||||
if monday.StartTime != "09:00" {
|
// Database returns HH:MM:SS format
|
||||||
t.Errorf("expected Monday start time 09:00, got %s", monday.StartTime)
|
if monday.StartTime != "09:00:00" {
|
||||||
|
t.Errorf("expected Monday start time 09:00:00, got %s", monday.StartTime)
|
||||||
}
|
}
|
||||||
if monday.EndTime != "17:00" {
|
if monday.EndTime != "17:00:00" {
|
||||||
t.Errorf("expected Monday end time 17:00, got %s", monday.EndTime)
|
t.Errorf("expected Monday end time 17:00:00, got %s", monday.EndTime)
|
||||||
}
|
}
|
||||||
if !monday.IsOpen {
|
if !monday.IsOpen {
|
||||||
t.Error("expected Monday to be open")
|
t.Error("expected Monday to be open")
|
||||||
@@ -187,8 +188,8 @@ func TestScheduling_UpdateDefaultHours_Admin(t *testing.T) {
|
|||||||
hours = append(hours, h)
|
hours = append(hours, h)
|
||||||
}
|
}
|
||||||
|
|
||||||
if hours[0].StartTime != "08:00" {
|
if hours[0].StartTime != "08:00:00" {
|
||||||
t.Errorf("expected Monday start time 08:00, got %s", hours[0].StartTime)
|
t.Errorf("expected Monday start time 08:00:00, got %s", hours[0].StartTime)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user