price-point-api/bruno/price-reports/update-price-report.bru
Mohammad Kanaan 13992e1dbe
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
feat: implement user authentication and session management
2026-06-14 14:12:37 +03:00

43 lines
No EOL
814 B
Text

meta {
name: Update Price Report
type: http
seq: 4
}
patch {
url: {{baseUrl}}/price_reports/{{priceReportId}}
body: json
}
headers {
Content-Type: application/json
Authorization: Bearer {{authToken}}
}
body:json {
{
"price_report": {
"price": "12.99",
"discount_price": "10.99"
}
}
}
assert {
res.status: equals 200
}
tests {
test("Update price report returns updated object", function() {
const data = res.getBody();
expect(data).to.have.property("id");
expect(data).to.have.property("price");
expect(data).to.have.property("discount_price");
});
test("Updated values are reflected", function() {
const data = res.getBody();
expect(String(data.price)).to.equal("12.99");
expect(String(data.discount_price)).to.equal("10.99");
});
}