aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/juick/server/tests/ServerTests.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-02-23 19:58:12 +0300
committerGravatar Vitaly Takmazov2019-02-23 19:58:12 +0300
commitc6007957456199945cd0511861d54e24c8873fb7 (patch)
tree2f67153f707eb043cc4a66c0ee609eba2e9463ed /src/test/java/com/juick/server/tests/ServerTests.java
parent116d87c9473b8135d0466be149f070e067e8b810 (diff)
Add activity json failed on production to tests
Diffstat (limited to 'src/test/java/com/juick/server/tests/ServerTests.java')
-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 b1a71c65..a4b3f95c 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 {