feat: lab2 done

This commit is contained in:
2026-10-09 15:48:03 +03:00
parent f743ee10a2
commit 575f8ee386
104 changed files with 7038 additions and 1099 deletions
+34
View File
@@ -0,0 +1,34 @@
meta {
name: Duplicate username returns 409
type: http
seq: 8
}
post {
url: {{baseUrl}}/api/v1/users
body: json
auth: none
}
docs {
Повторная регистрация того же username. Уникальность обеспечивает
unique-индекс PostgreSQL, ошибка 23505 маппится в 409 (не 500).
}
body:json {
{
"username": "{{username}}",
"display_name": "Дубликат",
"password": "{{password}}"
}
}
tests {
test("409 conflict", function() {
expect(res.status).to.equal(409);
});
test("код ошибки conflict", function() {
expect(res.body.error.code).to.equal("conflict");
});
}