From ef3c9087501f0eb4349c0f27740854502bf9e169 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 27 Oct 2017 13:07:14 +0300 Subject: api: telegram replies --- juick-api/src/test/java/com/juick/api/tests/MessagesTests.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'juick-api/src/test/java/com/juick/api') diff --git a/juick-api/src/test/java/com/juick/api/tests/MessagesTests.java b/juick-api/src/test/java/com/juick/api/tests/MessagesTests.java index 906e8713..63fac6a1 100644 --- a/juick-api/src/test/java/com/juick/api/tests/MessagesTests.java +++ b/juick-api/src/test/java/com/juick/api/tests/MessagesTests.java @@ -44,6 +44,8 @@ import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.util.UriComponents; +import org.springframework.web.util.UriComponentsBuilder; import javax.inject.Inject; import java.util.Arrays; @@ -262,4 +264,10 @@ public class MessagesTests extends AbstractJUnit4SpringContextTests { }); assertThat(user.get(0).getTokens().get(0).getToken(), equalTo(token)); } + @Test + public void tg2juickLinks() { + UriComponents uriComponents = UriComponentsBuilder.fromUriString("http://juick.com/123456#23").build(); + assertThat(uriComponents.getPath().substring(1), is("123456")); + assertThat(uriComponents.getFragment(), is("23")); + } } -- cgit v1.2.3