aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/test
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-09-04 11:22:57 +0300
committerGravatar Vitaly Takmazov2018-09-04 11:22:57 +0300
commitb3d633cf0e8a6c35be9755702dedbea29ff3d897 (patch)
treedd3f854063c03a3881594c2a592e9827dbbbbbf0 /juick-server/src/test
parent2f4701110c5deff4d0f83d728ac15c98b965f3a8 (diff)
WebFinger support
Diffstat (limited to 'juick-server/src/test')
-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());
}
}