diff options
Diffstat (limited to 'juick-server/src/test')
-rw-r--r-- | juick-server/src/test/java/com/juick/server/tests/ServerTests.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java index e3d7a380..c1132a99 100644 --- a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java +++ b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java @@ -34,6 +34,7 @@ import com.juick.server.*; import com.juick.server.api.activity.model.Context; import com.juick.server.api.activity.model.Key; import com.juick.server.api.activity.model.Person; +import com.juick.server.api.activity.model.activities.Create; import com.juick.server.api.activity.model.activities.Follow; import com.juick.server.api.activity.model.activities.Undo; import com.juick.server.util.HttpUtils; @@ -1690,6 +1691,12 @@ public class ServerTests { String undoJsonStr = IOUtils.toString(URI.create("classpath:undo.json"), StandardCharsets.UTF_8); Undo undo = jsonMapper.readValue(undoJsonStr, Undo.class); String undoFollower = (String)((Map)undo.getObject()).get("object"); + String createJsonStr = IOUtils.toString(URI.create("classpath:create.json"), StandardCharsets.UTF_8); + Create create = jsonMapper.readValue(createJsonStr, Create.class); + Map<String, Object> note = (Map<String, Object>) create.getObject(); + Map<String, Object> attachmentObj = (Map<String, Object> )((List<Object>) note.get("attachment")).get(0); + String attachment = attachmentObj != null ? (String)attachmentObj.get("url") : StringUtils.EMPTY; + } @Test public void signingSpec() throws IOException { |