Closed johnrhunt closed 5 years ago
The JSON I was running this against was:
{
"data": []
}
You are right @johnrhunt :)
The code should be changed in the following https://github.com/ubirak/rest-api-behat-extension/blob/master/src/Json/JsonContext.php#L42 https://github.com/ubirak/rest-api-behat-extension/blob/master/src/Json/JsonContext.php#L179
However I think it should go more abstractly like
And the JSON node "data" should be empty
And the JSON should be empty
Hello !
You can use the JSON array node "data" should have 0 element
Hope it fits your need
But yes we could create a proxy around the empty use case ! Looks fine for me
I followed @tyx 's recommendation - it worked lovely thank you.
@johnrhunt so, closing it
When I use:
I get the following:
I've tried, but I can't figure out why this is happening. Can anyone shed some light on this? It looks to me like an empty array needs to get translated into the string [] by Ubirak