diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/test/java/com/juick/server/tests/ServerTests.java | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index 221f4ec8..84034428 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -2077,14 +2077,6 @@ public class ServerTests { } @Test - public void hostmeta() throws Exception { - MvcResult result = mockMvc.perform(get("/.well-known/host-meta")).andExpect(status().isOk()) - .andReturn(); - String xrd = result.getResponse().getContentAsString(); - result = mockMvc.perform(get("/.well-known/x-nodeinfo2")).andExpect(status().isOk()).andReturn(); - } - - @Test public void pms() throws Exception { jdbcTemplate.execute("DELETE FROM pm"); jdbcTemplate.execute("DELETE FROM bl_users"); @@ -2310,27 +2302,6 @@ public class ServerTests { } @Test - public void nodeinfo() throws Exception { - MvcResult nodeinfoXRD = mockMvc - .perform(get("/.well-known/nodeinfo").contentType(MediaType.APPLICATION_JSON)) - .andExpect(status().isOk()).andReturn(); - JsonNode node = jsonMapper.readTree(nodeinfoXRD.getResponse().getContentAsString()); - assertThat(node.get("links"), notNullValue()); - String nodeinfoUrl = node.get("links").get(0).get("href").textValue(); - MvcResult nodeinfoData = mockMvc.perform(get(nodeinfoUrl).contentType(MediaType.APPLICATION_JSON)) - .andExpect(status().isOk()).andReturn(); - JsonNode nodeinfo = jsonMapper.readTree(nodeinfoData.getResponse().getContentAsString()); - assertThat(nodeinfo.get("software"), notNullValue()); - assertThat(nodeinfo.get("server"), nullValue()); - MvcResult xnodeinfoData = mockMvc - .perform(get("/.well-known/x-nodeinfo2").contentType(MediaType.APPLICATION_JSON)) - .andExpect(status().isOk()).andReturn(); - JsonNode xnodeinfo = jsonMapper.readTree(xnodeinfoData.getResponse().getContentAsString()); - assertThat(xnodeinfo.get("server"), notNullValue()); - assertThat(xnodeinfo.get("software"), nullValue()); - } - - @Test public void anonymousUserFromZero() { User user = userService.getUserByUID(0).orElse(AnonymousUser.INSTANCE); assertThat(user.isAnonymous(), is(true)); |