Skip to content

Commit f2badfa

Browse files
authored
test: refactor JSON.DEL test to account for change to deleting non-existing paths (#32)
1 parent 2728e27 commit f2badfa

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/test/java/com/redislabs/modules/rejson/ClientTest.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,9 @@ public void delValidShouldSucceed() throws Exception {
191191
}
192192

193193
@Test
194-
public void delException() throws Exception {
195-
Exception ex = assertThrows(JedisDataException.class, () -> {
196-
client.set( "foobar", new FooBarObject(), Path.ROOT_PATH);
197-
client.del( "foobar", new Path(".foo[1]")).longValue();
198-
});
199-
200-
assertTrue(ex.getMessage().contains("ERR invalid index '[1]' at level 1 in path"));
194+
public void delNonExistingPathsAreIgnored() throws Exception {
195+
client.set( "foobar", new FooBarObject(), Path.ROOT_PATH);
196+
client.del( "foobar", new Path(".foo[1]")).longValue();
201197
}
202198

203199
@Test

0 commit comments

Comments
 (0)