Field current-stock needs to be update
Closed this issue · 3 comments
pankajbhasker commented
Get Book Api {{baseUrl}}/books/:bookId response has field "current-stock" which is giving error while using it in post man unit test.
Here is my test case:
const response = pm.response.json();
console.log('books response : ', response);
const currentStock = response.current-stock;
pm.test("Checking if stocks is available ", () => {
pm.expect(currentStock).to.be.above(0);
});
ERROR I am getting is "ReferenceError: stock is not defined"
Kindly update the field while returning response as currentStock instead current-stock
pankajbhasker commented
Not an Issue can be close for now.
vdespa commented
This is the point of the exercise :)
pankajbhasker commented
I was doing exercise on go, though to update you as soon as possible but just after few min realize the point.