- assertThat(convertText(parts, PlainTextPart.class, PostPart.class), is("This [post|foo|Post about foo...] is awesome."));
+ assertThat(convertText(parts, PlainTextPart.class, PostPart.class), is("This [post|new|foo|Post about foo...] is awesome."));
+ }
+
+ @Test
+ public void linksToPostsWithOldIdsAreParsedCorrectly() throws IOException {
+ postProvider.addValidPostId("foo", "internal", "Post about foo...");
+ Iterable<Part> parts = soneTextParser.parse(null, new StringReader("This post://internal is awesome."));
+ assertThat(convertText(parts, PlainTextPart.class, PostPart.class), is("This [post|old|foo|Post about foo...] is awesome."));