aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/test/java/com/juick/api/tests
diff options
context:
space:
mode:
Diffstat (limited to 'juick-api/src/test/java/com/juick/api/tests')
-rw-r--r--juick-api/src/test/java/com/juick/api/tests/MessagesTests.java8
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"));
+ }
}