aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com')
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java
index 0724eb4f..b97ae8a3 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -217,6 +217,8 @@ public class ServerTests {
private Resource nojfif;
@Value("classpath:hubzilla_activity.json")
private Resource hubzillaActivity;
+ @Value("classpath:flag.json")
+ private Resource mastodonFlag;
@Value("classpath:hubzilla_follow.json")
private Resource hubzillaFollow;
@Value("classpath:to_as_string.json")
@@ -2275,7 +2277,7 @@ public class ServerTests {
}
@Test
- public void hubzillaAndHonkActorAndFriendicaUpdate() throws Exception {
+ public void hubzillaAndHonkActorAndFriendicaUpdateAndMastodonFlag() 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);
@@ -2286,6 +2288,9 @@ public class ServerTests {
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);
+ String flagString = IOUtils.toString(mastodonFlag.getInputStream(), StandardCharsets.UTF_8);
+ Flag flag = (Flag) jsonMapper.readValue(flagString, Context.class);
+ assertThat(flag.getObject().size(), is(3));
}
@Test