forked from mtusi2026/mtusi2026lab2
31 lines
633 B
Plaintext
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");
|
|
});
|
|
}
|