Skip to content

Commit

Permalink
Added a test for JSON Paths without assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
marcingrzejszczak committed Mar 27, 2016
1 parent 39dba0a commit c1b7bad
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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')]'''
Expand Down

0 comments on commit c1b7bad

Please sign in to comment.