From 39a8f8e41eb475d51ecbacf09674c439d1e1d183 Mon Sep 17 00:00:00 2001 From: Kalle Stenflo Date: Wed, 10 Sep 2014 10:47:42 +0200 Subject: [PATCH] Wrong assert made in test. --- .../src/test/java/com/jayway/jsonassert/JsonAssertTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/json-path-assert/src/test/java/com/jayway/jsonassert/JsonAssertTest.java b/json-path-assert/src/test/java/com/jayway/jsonassert/JsonAssertTest.java index 4d0d7d05..f33d91a8 100644 --- a/json-path-assert/src/test/java/com/jayway/jsonassert/JsonAssertTest.java +++ b/json-path-assert/src/test/java/com/jayway/jsonassert/JsonAssertTest.java @@ -45,11 +45,14 @@ public class JsonAssertTest { @Test public void invalid_path() throws Exception { - with(JSON).assertThat("$.store.book[*].fooBar", collectionWithSize(equalTo(4))); + with(JSON).assertThat("$.store.book[*].fooBar", emptyCollection()); } + + @Test(expected = AssertionError.class) public void failed_error_message() throws Exception { + with(JSON).assertThat("$.store.book[0].category", endsWith("foobar")); }