diff options
author | Vitaly Takmazov | 2017-10-27 13:07:14 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-10-28 06:15:17 +0000 |
commit | ef3c9087501f0eb4349c0f27740854502bf9e169 (patch) | |
tree | ac23f9effde6779b994de4ba9ddf8e039d700a3f /juick-api/src/test/java/com/juick/api | |
parent | 51df4a3aa7d76a0457c89efc55c35f0fa8e17896 (diff) |
api: telegram replies
Diffstat (limited to 'juick-api/src/test/java/com/juick/api')
-rw-r--r-- | juick-api/src/test/java/com/juick/api/tests/MessagesTests.java | 8 |
1 files changed, 8 insertions, 0 deletions
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")); + } } |