forked from mtusi2026/mtusi2026lab2
feat: lab2 done
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
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");
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user