price-point-api/bruno/auth/logout.bru

39 lines
653 B
Text
Raw Permalink Normal View History

meta {
name: Logout
type: http
seq: 3
}
delete {
url: {{baseUrl}}/logout
body: none
auth: none
}
headers {
Authorization: Bearer {{authToken}}
}
assert {
res.status: equals 200
res.body.success: equals true
}
script:post-response {
bru.deleteVar("authToken");
bru.deleteVar("userId");
}
tests {
test("Logout returns { success: true }", function() {
const data = res.getBody();
expect(data).to.have.property("success");
expect(data.success).to.equal(true);
});
test("Logout response has no data envelope", function() {
const data = res.getBody();
expect(data).to.not.have.property("data");
});
}