Skip to content

Commit 0769862

Browse files
committed
chore: added softDelete / restore test
1 parent 3de8808 commit 0769862

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/test/java/io/getstream/client/ReactionsClientTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,15 @@ public void delete() throws Exception {
115115
client.reactions().delete(reply.getId()).join();
116116
}
117117
}
118+
119+
@Test
120+
public void softDelete() throws Exception {
121+
Client client = Client.builder(apiKey, secret).build();
122+
123+
Reaction data =
124+
Reaction.builder().activityID("ed2837a6-0a3b-4679-adc1-778a1704852d").kind("like").build();
125+
Reaction reply = client.reactions().add("user-id", data, new FeedID("flat", "1")).join();
126+
client.reactions().softDelete(reply.getId()).join();
127+
client.reactions().restore(reply.getId()).join();
128+
}
129+
}

src/test/java/io/getstream/cloud/CloudReactionsClientTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,15 @@ public void delete() throws Exception {
9191
client.reactions().delete(reply.getId()).join();
9292
}
9393
}
94+
95+
@Test
96+
public void softDelete() throws Exception {
97+
Client client = Client.builder(apiKey, secret).build();
98+
99+
Reaction data =
100+
Reaction.builder().activityID("ed2837a6-0a3b-4679-adc1-778a1704852d").kind("like").build();
101+
Reaction reply = client.reactions().add("user-id", data, new FeedID("flat", "1")).join();
102+
client.reactions().softDelete(reply.getId()).join();
103+
client.reactions().restore(reply.getId()).join();
104+
}
105+
}

0 commit comments

Comments
 (0)