forked from mtusi2026/mtusi2026lab2
feat: lab2 done
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
meta {
|
||||
name: Get chat by id
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{baseUrl}}/api/v1/chats/{{chatId}}
|
||||
body: none
|
||||
auth: none
|
||||
}
|
||||
|
||||
headers {
|
||||
Authorization: Bearer {{token}}
|
||||
}
|
||||
|
||||
docs {
|
||||
Участник получает чат, посторонний — 404 (не 403: существование чужого
|
||||
объекта не раскрывается).
|
||||
}
|
||||
|
||||
tests {
|
||||
test("200 ok", function() {
|
||||
expect(res.status).to.equal(200);
|
||||
});
|
||||
|
||||
test("id совпадает", function() {
|
||||
expect(res.body.id).to.equal(bru.getVar("chatId"));
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user