Hello
I am trying to put an assertion for a specific field value in the array , e.g. āmessageā should contain the value as āInvalid property valueā in the below response
āerrorsā: [
{
āerrorā: 900,
āmessageā: āInvalid property valueā,
} ]}
postman assertion script is :
let jsonData = pm.response.json()
pm.test(āThe errors
contains messageā, () => {
_.each(jsonData.Fee, (item) => {
pm.expect(item.message).to.include("Invalid property value")
})})
but what I observed is this script is passed for following response also
āmessageā: āSuccessfulā,
ādecisionā: āPERMITā,