diff --git a/jsonassert/src/test/groovy/com/toomuchcoding/jsonassert/JsonAssertionSpec.groovy b/jsonassert/src/test/groovy/com/toomuchcoding/jsonassert/JsonAssertionSpec.groovy index 2035bf6..d8e564c 100644 --- a/jsonassert/src/test/groovy/com/toomuchcoding/jsonassert/JsonAssertionSpec.groovy +++ b/jsonassert/src/test/groovy/com/toomuchcoding/jsonassert/JsonAssertionSpec.groovy @@ -35,6 +35,7 @@ public class JsonAssertionSpec extends Specification { where: verifiable || expectedJsonPath assertThat(json1).field("some").field("nested").field("anothervalue").isEqualTo(4) || '''$.some.nested[?(@.anothervalue == 4)]''' + assertThat(json1).field("some").field("nested").field("anothervalue") || '''$.some.nested.anothervalue''' assertThatJson(json1).field("some").field("nested").field("anothervalue").isEqualTo(4) || '''$.some.nested[?(@.anothervalue == 4)]''' assertThat(json1).field("some").field("nested").array("withlist").contains("name").isEqualTo("name1") || '''$.some.nested.withlist[*][?(@.name == 'name1')]''' assertThat(json1).field("some").field("nested").array("withlist").contains("name").isEqualTo("name2") || '''$.some.nested.withlist[*][?(@.name == 'name2')]'''