0votes
Write integration tests for an endpointPromptLow risk
Cover the happy path, auth and the edge cases that bite in production.
Write integration tests for this endpoint using {{test_framework}}: {{endpoint_code}} Cover at minimum: - Success with valid input (assert body and status). - Missing/invalid auth → 401/403. - Validation failures for each required field. - Not found and conflict cases. - Rate limit or duplicate submission behavior if present. Use factories for test data, clean up after each test, and don't mock the database unless I say so.

Log in to join the discussion.