price-point-api/bruno/users/get-user.bru

34 lines
689 B
Text
Raw Normal View History

meta {
name: Get User
type: http
seq: 1
}
get {
url: {{baseUrl}}/users/{{userId}}
}
headers {
Authorization: Bearer {{authToken}}
}
assert {
res.status: equals 200
res.body.success: equals true
}
tests {
test("Get user returns wrapped success response", function() {
const data = res.getBody();
expect(data).to.have.property("success");
expect(data.success).to.equal(true);
expect(data).to.have.property("data");
});
test("User data has correct shape", function() {
const data = res.getBody();
expect(data.data).to.have.property("id");
expect(data.data).to.have.property("email");
expect(data.data).to.have.property("name");
});
}