Files
mtusi2026lab2/bruno/negative/non-member-chat-404.bru
T
2026-10-09 15:48:03 +03:00

31 lines
633 B
Plaintext

meta {
name: Non-member receives 404
type: http
seq: 5
}
get {
url: {{baseUrl}}/api/v1/chats/{{chatId}}
body: none
auth: none
}
headers {
Authorization: Bearer {{thirdToken}}
}
docs {
Аутентификация прошла, но доступа к ресурсу нет. Контракт требует 404,
а не 403: существование чужого чата не раскрывается.
}
tests {
test("404 not_found", function() {
expect(res.status).to.equal(404);
});
test("код ошибки not_found", function() {
expect(res.body.error.code).to.equal("not_found");
});
}