diff --git a/json-path-assert/src/test/java/com/jayway/jsonpath/matchers/HasNoJsonPathTest.java b/json-path-assert/src/test/java/com/jayway/jsonpath/matchers/HasNoJsonPathTest.java index edd4ca9e..b463742d 100644 --- a/json-path-assert/src/test/java/com/jayway/jsonpath/matchers/HasNoJsonPathTest.java +++ b/json-path-assert/src/test/java/com/jayway/jsonpath/matchers/HasNoJsonPathTest.java @@ -8,6 +8,7 @@ import static org.junit.Assert.assertThat; public class HasNoJsonPathTest { private static final String JSON_STRING = "{" + + "\"none\": null," + "\"name\": \"Jessie\"" + "}"; @@ -21,6 +22,11 @@ public class HasNoJsonPathTest { assertThat(JSON_STRING, not(hasNoJsonPath("$.name"))); } + @Test + public void shouldNotMatchExplicitNull() { + assertThat(JSON_STRING, not(hasNoJsonPath("$.none"))); + } + @Test public void shouldBeDescriptive() { assertThat(hasNoJsonPath("$.name"),