feat(platform): expose no-data vehicles

This commit is contained in:
lingniu
2026-07-04 04:25:29 +08:00
parent 7f9d327f38
commit 40397efa4a
13 changed files with 79 additions and 19 deletions

View File

@@ -131,6 +131,16 @@ func TestHandlerVehicleCoverageSummary(t *testing.T) {
}
}
func TestSplitCSVEmptyReturnsEmptySlice(t *testing.T) {
values := splitCSV("")
if values == nil {
t.Fatalf("empty CSV should encode as [] instead of JSON null")
}
if len(values) != 0 {
t.Fatalf("empty CSV should have no values, got %#v", values)
}
}
func TestHandlerVehicleDetail(t *testing.T) {
handler := NewHandler(NewService(NewMockStore()))
rec := httptest.NewRecorder()