fix(tests): card_history tool ahora retorna *CardHistoryResponse — desempaquetar .ColumnHistory
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user