fix: handle empty candidate trait lists
Return empty JSON arrays from the API and normalize nullable values from older servers before rendering candidate match counts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
6969f79015
commit
fd06fbbb5d
4 changed files with 36 additions and 3 deletions
|
|
@ -19,3 +19,10 @@ func TestInterviewOmitsReferenceAnswer(t *testing.T) {
|
|||
t.Fatalf("expected participant-safe code question, got %#v", response)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCandidateAlwaysUsesJSONArrays(t *testing.T) {
|
||||
response := CandidateToWeb(servicemodel.CandidateMatch{})
|
||||
if response.Matched == nil || response.Missing == nil {
|
||||
t.Fatalf("candidate trait collections must not be nil: %#v", response)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue