aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/test/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-09-04 12:25:14 +0300
committerGravatar Vitaly Takmazov2018-09-04 12:25:14 +0300
commit5c491c20f8201b1a90335899aa0f2eb72ed0daff (patch)
treedd4f7857f0a3745030e08eea999676a8cbc462be /juick-server/src/test/java/com
parentb3d633cf0e8a6c35be9755702dedbea29ff3d897 (diff)
ActivityStreams initial support
Diffstat (limited to 'juick-server/src/test/java/com')
-rw-r--r--juick-server/src/test/java/com/juick/server/tests/ServerTests.java8
1 files changed, 8 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 9a4fb93a3..63ba4b3ee 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
@@ -23,6 +23,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.jayway.jsonpath.JsonPath;
import com.juick.*;
import com.juick.server.*;
+import com.juick.server.api.activity.model.ActivityObject;
import com.juick.server.component.MessageEvent;
import com.juick.server.helpers.AnonymousUser;
import com.juick.server.helpers.CommandResult;
@@ -1332,4 +1333,11 @@ public class ServerTests {
mockMvc.perform(get("/.well-known/webfinger?resource=acct:durov@localhost"))
.andExpect(status().isNotFound());
}
+ @Test
+ public void userProfilesShouldBeExposedAsActivityStream() throws Exception {
+ mockMvc.perform(get("/u/ugnich").accept(ActivityObject.CONTENT_TYPE))
+ .andExpect(status().isOk())
+ .andExpect(jsonPath("$.@context", is(ActivityObject.CONTEXT_URI)))
+ .andExpect(jsonPath("$.icon", is("http://localhost:8080/i/a/1.png")));
+ }
}