Merge pull request #152 from Codearte/feature/arrays_assertions_fix
Size assertion causes invalid specs for some arrays #151
This commit is contained in:
@@ -17,8 +17,7 @@ class JsonPathEntry {
|
||||
if (optionalSuffix) {
|
||||
return ["!${parsedJsonVariable}.read('''${jsonPath}''', JSONArray).empty"]
|
||||
} else if (traversesOverCollections()) {
|
||||
return ["${parsedJsonVariable}.read('''${jsonPath}''', JSONArray).size() == 1",
|
||||
"${parsedJsonVariable}.read('''${jsonPath}''', JSONArray).get(0) ${operator()} ${potentiallyWrappedWithQuotesValue()}"]
|
||||
return ["${parsedJsonVariable}.read('''${jsonPath}''', JSONArray).get(0) ${operator()} ${potentiallyWrappedWithQuotesValue()}"]
|
||||
}
|
||||
return ["${parsedJsonVariable}.read('''${jsonPath}''') ${operator()} ${potentiallyWrappedWithQuotesValue()}"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user