diff --git a/tests/integration/test_api.py b/tests/integration/test_api.py index 22303b2..9d5f161 100644 --- a/tests/integration/test_api.py +++ b/tests/integration/test_api.py @@ -3,6 +3,13 @@ from fastapi.testclient import TestClient from tests.factories import SecretFactory +def test_empty_secret_is_not_accepted(client: TestClient): + response = client.post("/secret", json={"data": ""}) + + assert response.status_code == 422 + assert "data" in response.text + + def test_store_secret_returns_key(client: TestClient): response = client.post("/secret", json=dict(SecretFactory().build()))