aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/test/java')
-rw-r--r--juick-server/src/test/java/com/juick/server/tests/ServerTests.java10
1 files changed, 10 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 b5f5143b..9a4fb93a 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
@@ -1320,6 +1320,16 @@ public class ServerTests {
assertThat(messagesService.getMessages(AnonymousUser.INSTANCE, Collections.singletonList(mid)).get(0).getReplies(), is(1));
assertThat(messagesService.getReplies(banned, mid).size(), is(2));
assertThat(messagesService.getMessages(banned, Collections.singletonList(mid)).get(0).getReplies(), is(2));
+ }
+ @Test
+ public void accountUrlsShouldBeExposedOverWebfinger() throws Exception {
+ mockMvc.perform(get("/.well-known/webfinger?resource=acct:ugnich@localhost"))
+ .andExpect(status().isOk())
+ .andExpect(jsonPath("$.subject", is("acct:ugnich@localhost")))
+ .andExpect(jsonPath("$.links", hasSize(2)))
+ .andExpect(jsonPath("$.links[0].href", is("http://localhost:8080/u/ugnich")));
+ mockMvc.perform(get("/.well-known/webfinger?resource=acct:durov@localhost"))
+ .andExpect(status().isNotFound());
}
}