aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/juick')
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java
index b1a71c65e..a4b3f95cb 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -25,16 +25,15 @@ import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.css.StyleElement;
import com.gargoylesoftware.htmlunit.html.DomElement;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import com.github.jsonldjava.core.JsonLdOptions;
+import com.github.jsonldjava.core.JsonLdProcessor;
+import com.github.jsonldjava.utils.JsonUtils;
import com.jayway.jsonpath.JsonPath;
import com.juick.*;
import com.juick.model.*;
import com.juick.server.*;
import com.juick.server.api.activity.model.Context;
-import com.juick.server.api.activity.model.activities.Create;
-import com.juick.server.api.activity.model.activities.Delete;
-import com.juick.server.api.activity.model.activities.Follow;
-import com.juick.server.api.activity.model.activities.Like;
-import com.juick.server.api.activity.model.activities.Undo;
+import com.juick.server.api.activity.model.activities.*;
import com.juick.server.api.activity.model.objects.Note;
import com.juick.server.api.activity.model.objects.Person;
import com.juick.server.api.webfinger.model.Account;
@@ -212,6 +211,8 @@ public class ServerTests {
private Resource nojfif;
@Value("classpath:hubzilla_activity.json")
private Resource hubzillaActivity;
+ @Value("classpath:note_document.json")
+ private Resource noteWithDocument;
@Inject
private KeystoreManager testKeystoreManager;
@@ -1947,6 +1948,8 @@ public class ServerTests {
public void federatedAttachmentsAsLinks() throws Exception {
int mid = messagesService.createMessage(ugnich.getUid(), "test", StringUtils.EMPTY, Collections.emptyList());
Message testMessage = MockUtils.mockMessage(mid, freefd, "reply");
+ String activity = IOUtils.toString(noteWithDocument.getInputStream(), StandardCharsets.UTF_8);
+ Announce announce = jsonMapper.readValue(activity, Announce.class);
}
@Test
public void hubzillaActor() throws Exception {