37 lines
No EOL
917 B
Text
37 lines
No EOL
917 B
Text
meta {
|
|
name: Get Price Report
|
|
type: http
|
|
seq: 3
|
|
}
|
|
|
|
get {
|
|
url: {{baseUrl}}/price_reports/{{priceReportId}}
|
|
}
|
|
|
|
headers {
|
|
Authorization: Bearer {{authToken}}
|
|
}
|
|
|
|
assert {
|
|
res.status: equals 200
|
|
}
|
|
|
|
tests {
|
|
test("Get price report returns report object directly", function() {
|
|
const data = res.getBody();
|
|
expect(data).to.have.property("id");
|
|
expect(data).to.have.property("price");
|
|
expect(data).to.have.property("discount_price");
|
|
expect(data).to.have.property("store_id");
|
|
expect(data).to.have.property("product_id");
|
|
expect(data).to.have.property("user_id");
|
|
expect(data).to.have.property("reported_at");
|
|
expect(data).to.have.property("created_at");
|
|
expect(data).to.have.property("updated_at");
|
|
});
|
|
|
|
test("Price report id matches requested id", function() {
|
|
const data = res.getBody();
|
|
expect(data.id).to.equal(Number(bru.getVar("priceReportId")));
|
|
});
|
|
} |