price-point-api/bruno/chains/list-chains.bru

32 lines
534 B
Text
Raw Normal View History

meta {
name: List Chains
type: http
seq: 1
}
get {
url: {{baseUrl}}/chains
}
headers {
Authorization: Bearer {{authToken}}
}
assert {
res.status: equals 200
}
tests {
test("List chains returns an array", function() {
const data = res.getBody();
expect(data).to.be.an("array");
});
test("Each chain has correct shape", function() {
const data = res.getBody();
data.forEach(function(chain) {
expect(chain).to.have.property("id");
expect(chain).to.have.property("name");
});
});
}