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
@@ -0,0 +1,31 @@
meta {
name: Invalid limit and cursor
type: http
seq: 6
}
get {
url: {{baseUrl}}/api/v1/chats/{{chatId}}/messages?limit=101&cursor=not-a-cursor
body: none
auth: none
}
headers {
Authorization: Bearer {{token}}
}
docs {
limit вне 1..100 и неизвестный cursor — 400 invalid_request,
в одном формате ошибки с request_id, совпадающим с заголовком.
}
tests {
test("400 invalid_request", function() {
expect(res.status).to.equal(400);
});
test("формат ошибки по контракту", function() {
expect(res.body.error.code).to.equal("invalid_request");
expect(res.body.error.request_id).to.equal(res.headers["x-request-id"]);
});
}