From 0e20ca44eee0cb2726b575aed88a495206481973 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 4 Jan 2023 07:18:16 +0300 Subject: ActivityPub: handle Note updates --- src/test/java/com/juick/server/tests/ServerTests.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/test/java/com') diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index 5eeeab3d..6e4bbcb5 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -255,6 +255,8 @@ public class ServerTests { private Resource sapeOutput; @Value("classpath:flag.json") private Resource flagPayload; + @Value("classpath:friendica_update.json") + private Resource friendicaUpdate; @Inject AppleClientSecretGenerator clientSecretGenerator; @Inject @@ -2449,7 +2451,7 @@ public class ServerTests { } @Test - public void hubzillaAndHonkActor() throws Exception { + public void hubzillaAndHonkActorAndFriendicaUpdate() throws Exception { String activity = IOUtils.toString(hubzillaActivity.getInputStream(), StandardCharsets.UTF_8); Create create = jsonMapper.readValue(activity, Create.class); String followData = IOUtils.toString(hubzillaFollow.getInputStream(), StandardCharsets.UTF_8); @@ -2458,6 +2460,8 @@ public class ServerTests { String honkData = IOUtils.toString(honkFollow.getInputStream(), StandardCharsets.UTF_8); Follow hfollow = jsonMapper.readValue(honkData, Follow.class); assertThat(hfollow.getTo().get(0), is("https://juick.com/u/vt")); + String updateString = IOUtils.toString(friendicaUpdate.getInputStream(), StandardCharsets.UTF_8); + Update update = jsonMapper.readValue(updateString, Update.class); } @Test -- cgit v1.2.3