meta { name: Wrong password type: http seq: 1 } post { url: {{baseUrl}}/api/v1/auth/sessions body: none auth: basic } auth:basic { username: {{username}} password: definitely-wrong-password } docs { Неверный пароль: 401 без раскрытия, существует ли пользователь, и с тем же Basic-challenge, что и при неизвестном пользователе. } tests { test("401 unauthorized", function() { expect(res.status).to.equal(401); }); test("Basic challenge", function() { expect(res.headers["www-authenticate"]).to.equal('Basic realm="messenger", charset="UTF-8"'); }); test("request_id совпадает с заголовком", function() { expect(res.body.error.request_id).to.equal(res.headers["x-request-id"]); }); }