fix(tests): card_history tool ahora retorna *CardHistoryResponse — desempaquetar .ColumnHistory

This commit is contained in:
egutierrez
2026-05-27 18:46:18 +02:00
parent 172850178d
commit 065070cec7
+2 -2
View File
@@ -256,7 +256,7 @@ func TestExecuteTool_MoveCard_BetweenColumns_OpensHistory(t *testing.T) {
histRes := executeTool(db, "card_history", mustJSON(t, map[string]string{"id": card.ID}))
mustOK(t, histRes)
hist := histRes.Result.([]HistoryEntry)
hist := histRes.Result.(*CardHistoryResponse).ColumnHistory
if len(hist) != 2 {
t.Fatalf("expected 2 history entries, got %d", len(hist))
}
@@ -286,7 +286,7 @@ func TestExecuteTool_CardHistory_Single(t *testing.T) {
res := executeTool(db, "card_history", mustJSON(t, map[string]string{"id": card.ID}))
mustOK(t, res)
hist := res.Result.([]HistoryEntry)
hist := res.Result.(*CardHistoryResponse).ColumnHistory
if len(hist) != 1 || hist[0].ExitedAt != nil {
t.Fatalf("expected 1 open history entry, got %+v", hist)
}