fix(project): include default_branch in project list summary response

This commit is contained in:
Renn F
2026-06-03 19:20:54 +02:00
parent 5afe87716c
commit 7c91a85e7e
2 changed files with 19 additions and 0 deletions
+16
View File
@@ -156,6 +156,22 @@ async def test_list_projects_filter_by_cell(
assert response.status_code == HTTPStatus.OK
@pytest.mark.asyncio
async def test_list_projects_includes_default_branch(
project_client: AsyncClient,
) -> None:
payload = _payload()
payload["default_branch"] = "master"
create = await project_client.post("/api/projects", json=payload, headers=_HDR)
assert create.status_code == HTTPStatus.CREATED
response = await project_client.get("/api/projects", headers=_HDR)
assert response.status_code == HTTPStatus.OK
listed = {p["slug"]: p for p in response.json()}
assert payload["slug"] in listed
assert listed[payload["slug"]]["default_branch"] == "master"
@pytest.mark.asyncio
async def test_get_project_by_slug_not_found(project_client: AsyncClient) -> None:
response = await project_client.get(