diff options
author | Vitaly Takmazov | 2022-12-22 03:46:12 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2022-12-22 04:18:27 +0300 |
commit | d4df81c28908c593c2b59f2596e4e380492b32d0 (patch) | |
tree | 046e58ccb5075dcbba83a68d031d57a00d6b775a /src/test/java | |
parent | 15fbc16291e0a15cf05e9b4477eaf8709833d3a0 (diff) |
www: Mastodon-compatible `/share` endpoint
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/com/juick/server/tests/ServerTests.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index 236c113b..a892bcf4 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -2764,4 +2764,8 @@ public class ServerTests { assertThat(messagesService.getMessages(ugnich, List.of(mid)).size(), is(1)); assertThat(messagesService.getMessages(ugnich, List.of(mid)).get(0).isUnread(), is(false)); } + @Test + public void shareUrlShouldRedirectToPost() throws Exception { + mockMvc.perform(get("/share?text=Hello\nWorld")).andExpect(redirectedUrl("/post?body=Hello%0AWorld")); + } } |