fix whitespace and NULL validation
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
2026-10-28 20:31:49 +03:00
parent 7a72faf0e9
commit f75ad8cc97
15 changed files with 248 additions and 145 deletions
+13
View File
@@ -194,3 +194,16 @@ async def test_chat_endpoints_require_bearer(client: AsyncClient):
assert (
await client.post("/api/v1/chats", json={"title": "x", "member_ids": []})
).status_code in (401, 400)
async def test_nul_in_chat_title_is_rejected(client: AsyncClient):
alice = await create_user(client)
response = await client.post(
"/api/v1/chats",
headers=bearer(alice),
json={"title": "chat\u0000title", "member_ids": [alice["id"]]},
)
assert response.status_code == 400
assert response.json()["error"]["code"] == "invalid_request"