diff --git a/tests/test_api.py b/tests/test_api.py index 903e0d0..f461448 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -39,6 +39,19 @@ def test_board_hides_pull_requests_and_reconciles(client): assert [c["issue_number"] for c in state["done"]] == [3] # reconciled +def test_board_renders_closed_issue_in_done_column(client): + # Regression: reconcile moved the closed issue's row to "done", but + # the board merged open issues only, so the card never rendered and + # the "Terminé" column stayed empty. + models.move_issue("Projets/demo", 3, "todo") # closed in Gitea + r = client.get("/board/Projets/demo") + assert r.status_code == 200 + assert "Ancienne tâche" in r.text + payload = client.get("/api/board/Projets/demo").json() + assert payload["columns"]["done"]["count"] == 1 + assert "Ancienne tâche" in payload["columns"]["done"]["html"] + + def test_focus_lists_in_progress_across_projects(client): models.move_issue("Projets/demo", 5, "in_progress") r = client.get("/focus")