Skip to content

Commit

Permalink
Revert "Non-arrays get cleared too (#65)" (#72)
Browse files Browse the repository at this point in the history
This reverts commit 4858eea.
  • Loading branch information
sazzad16 committed May 17, 2022
1 parent c542f71 commit 4c8e0a0
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/test/java/com/redislabs/modules/rejson/ClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -417,15 +417,11 @@ public void clearArray() {

assertEquals(1L, client.clear("foobar", arrPath));
assertEquals(Long.valueOf(0L), client.arrLen("foobar", arrPath));
}

@Test
public void clearString() {
client.set("foobar", new FooBarObject(), Path.ROOT_PATH);


// ignore non-array
Path strPath = Path.of("foo");
assertEquals(1L, client.clear("foobar", strPath));
assertEquals("", client.get("foobar", String.class, strPath));
assertEquals(0L, client.clear("foobar", strPath));
assertEquals("bar", client.get("foobar", String.class, strPath));
}

@Test
Expand Down

0 comments on commit 4c8e0a0

Please sign in to comment.