Files
mtusi2026lab2/bruno/zz-cleanup/logout-current-session.bru
2026-10-09 15:48:03 +03:00

31 lines
664 B
Plaintext

meta {
name: Logout current session (run last)
type: http
seq: 1
}
delete {
url: {{baseUrl}}/api/v1/auth/sessions/current
body: none
auth: none
}
headers {
Authorization: Bearer {{token}}
}
docs {
Папка zz-cleanup выполняется последней: отзываем основную сессию и
проверяем, что тот же токен больше не принимается. Ответ 204 без тела.
}
tests {
test("204 no content", function() {
expect(res.status).to.equal(204);
});
test("тела нет", function() {
expect(res.body === "" || res.body === undefined).to.be.true;
});
}