fix: answer an empty checklist with an empty items list

This commit is contained in:
Jakub Zych
2026-10-30 13:36:09 +01:00
parent d894515da1
commit 9677e58288
42 changed files with 52 additions and 48 deletions

View File

@@ -43,6 +43,9 @@ func TestChecklistsAgainstDatabase(t *testing.T) {
created := obj(alice.want(http.StatusCreated, "POST", base+"/checklists",
`{"title":"Zjazd 1","meeting_id":`+jsonID(meeting.ID)+`}`)["data"])
cid := id(created["id"])
if items, ok := created["items"].([]any); !ok || len(items) != 0 {
t.Errorf("new checklist items = %v, want []", created["items"])
}
if obj(created["meeting"])["number"] != float64(meeting.Number) {
t.Errorf("meeting = %v", created["meeting"])
}