35 lines
685 B
Text
35 lines
685 B
Text
|
|
meta {
|
||
|
|
name: List Stores
|
||
|
|
type: http
|
||
|
|
seq: 1
|
||
|
|
}
|
||
|
|
|
||
|
|
get {
|
||
|
|
url: {{baseUrl}}/stores
|
||
|
|
}
|
||
|
|
|
||
|
|
headers {
|
||
|
|
Authorization: Bearer {{authToken}}
|
||
|
|
}
|
||
|
|
|
||
|
|
assert {
|
||
|
|
res.status: equals 200
|
||
|
|
}
|
||
|
|
|
||
|
|
tests {
|
||
|
|
test("List stores returns an array", function() {
|
||
|
|
const data = res.getBody();
|
||
|
|
expect(data).to.be.an("array");
|
||
|
|
});
|
||
|
|
|
||
|
|
test("Each store has correct shape", function() {
|
||
|
|
const data = res.getBody();
|
||
|
|
data.forEach(function(store) {
|
||
|
|
expect(store).to.have.property("id");
|
||
|
|
expect(store).to.have.property("name");
|
||
|
|
expect(store).to.have.property("latitude");
|
||
|
|
expect(store).to.have.property("longitude");
|
||
|
|
expect(store).to.have.property("chain_id");
|
||
|
|
});
|
||
|
|
});
|
||
|
|
}
|