From f8406131fdbe835c52fd46ad68ddc7b0df54cffe Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 22 Dec 2022 05:43:40 +0300 Subject: `@username@example.com` urls are now redirects to ActivityPub profile --- src/test/java/com/juick/server/tests/ServerTests.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/test') diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index a892bcf4..38eace7c 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -2768,4 +2768,10 @@ public class ServerTests { public void shareUrlShouldRedirectToPost() throws Exception { mockMvc.perform(get("/share?text=Hello\nWorld")).andExpect(redirectedUrl("/post?body=Hello%0AWorld")); } + @Test + public void mentionUrlsShouldRedirectToExternalUser() throws Exception { + mockMvc.perform(get("/mention?username=vt@juick.com")).andExpect( + redirectedUrl("https://juick.com/vt/") + ); + } } -- cgit v1.2.3