price-point-api/bruno/stores/get-store.bru

35 lines
772 B
Text
Raw Normal View History

meta {
name: Get Store
type: http
seq: 3
}
get {
url: {{baseUrl}}/stores/{{storeId}}
}
headers {
Authorization: Bearer {{authToken}}
}
assert {
res.status: equals 200
}
tests {
test("Get store returns store object directly", function() {
const data = res.getBody();
expect(data).to.have.property("id");
expect(data).to.have.property("name");
expect(data).to.have.property("latitude");
expect(data).to.have.property("longitude");
expect(data).to.have.property("chain_id");
expect(data).to.have.property("created_at");
expect(data).to.have.property("updated_at");
});
test("Store id matches requested id", function() {
const data = res.getBody();
expect(data.id).to.equal(Number(bru.getVar("storeId")));
});
}