Create a new assertion ShouldJsonContain for arrays
floriancazals opened this issue · comments
floriancazals commented
I have the following case, an array baz
containing two elements. Each of the element is an object with the attribute attr
For example:
{
"baz": [
{
"attr": "foo"
},
{
"attr": "bar"
}
]
}
I would like to make an assertion like this one
assertions:
- result.bodyjson.baz.attr ShouldJsonContain foo
Avoiding to have to specify the index of the array which.
Indeed the attrubute foo
may be on index 1 instead of index 0 in my case.
Yvonnick Esnault commented
done