I am writing tests collections for endpoints and I want the test to check if the response param estadoAula has the same value as the request param estadoAula so I can test everything went as intended. The param need to be sent in the body and not in the URL
Request Body
{
"estadoAula": "1"
}
Response Body
{
"idAula": "8d4cf346-cda0-47ca-acae-33981738b4b6",
"estadoAula": "1"
}
Test
pm.test("Estado modificado correctamente",function(){
var data = pm.response.json();
let estadoAula = pm.request.body.estadoAula; <--- this doesn´t work, I need to get request param 'estadoAula'
pm.expect(data.estadoAula).to.eql(estadoAula);
});