-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Response body is []. This is with "newJsonArrayMinLike(0, ...)" #108
Comments
Firstly,
It is an empty JSON array.
This is stating that any number of items are acceptable in the array, including none. Thus the Provider test will pass with any number of items in the array. |
Is empty JSON array is considered just like "empty JSON"?
The problem is that elements of array which are not matched to the rules, just ignored. And provider tests passed, while provider tests should faild because of wrong data. |
An empty JSON array is not "empty JSON", it contains two characters |
When I specify
newJsonArrayMinLike(0,...)
in Java (zero min elements), then response body in pact-file is empty array "[]".How such body is interpreted?
Provider test passed even with the body, which should not be matched.
How is body "[]" interpreted? It seems that body is considered as absent, because it seems considered as "the body contents are not important" according to the spec 3.
But I want to be sure, specification does not describe this, or this is a bug is in pact-jvm-consumer-java8.
This is when working with pact-jvm-consumer-java8, v4.0.6
Could somebody please clarify this?
Thanks.
The text was updated successfully, but these errors were encountered: