Files
mtusi2026lab2/bruno/messages/history-next-page.bru
T
2026-10-09 15:48:03 +03:00

32 lines
802 B
Plaintext

meta {
name: History next page by cursor
type: http
seq: 4
}
get {
url: {{baseUrl}}/api/v1/chats/{{chatId}}/messages?limit=1&cursor={{nextCursor}}
body: none
auth: none
}
headers {
Authorization: Bearer {{secondToken}}
}
docs {
Продолжение по курсору. Курсор привязан к чату: значение от другого
чата вернёт 400. Последний элемент предыдущей страницы не повторяется.
}
tests {
test("200 ok", function() {
expect(res.status).to.equal(200);
});
test("второй элемент не дублирует первый", function() {
expect(res.body.items.length).to.equal(1);
expect(res.body.items[0].id).to.not.equal(bru.getVar("messageId"));
});
}