aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2021-08-24 19:04:00 +0300
committerGravatar Vitaly Takmazov2021-08-24 19:04:00 +0300
commit32588150d5d7b5173270a50bfb131f21dbfa0166 (patch)
treef97081518d6c2f7db08feecdbd542815be5c8967
parent72aaf2417ecb10696538ab0e0762e732328c64ac (diff)
ActivityPub: add Undo deserialization test
-rw-r--r--src/main/java/com/juick/www/api/activity/Profile.java1
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java1
2 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/juick/www/api/activity/Profile.java b/src/main/java/com/juick/www/api/activity/Profile.java
index eb8909b5..667092c4 100644
--- a/src/main/java/com/juick/www/api/activity/Profile.java
+++ b/src/main/java/com/juick/www/api/activity/Profile.java
@@ -77,7 +77,6 @@ import java.io.InputStream;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.util.List;
-import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java
index bdca6cd2..3ba5d7e3 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -1784,6 +1784,7 @@ public class ServerTests {
Person person = (Person) jsonMapper.readValue(personJsonStr, Context.class);
String undoJsonStr = IOUtils.toString(new ClassPathResource("undo.json").getURI(), StandardCharsets.UTF_8);
Undo undo = jsonMapper.readValue(undoJsonStr, Undo.class);
+ assertThat(undo.getObject(), instanceOf(Follow.class));
String undoFollower = undo.getObject().getId();
String createJsonStr = IOUtils.toString(new ClassPathResource("create.json").getURI(), StandardCharsets.UTF_8);
Create create = jsonMapper.readValue(createJsonStr, Create.class);