From 5c491c20f8201b1a90335899aa0f2eb72ed0daff Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 4 Sep 2018 12:25:14 +0300 Subject: ActivityStreams initial support --- .../src/test/java/com/juick/server/tests/ServerTests.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'juick-server/src/test/java/com') 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 9a4fb93a..63ba4b3e 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"))); + } } -- cgit v1.2.3