Use internal image IDs for temporary images
[Sone.git] / src / test / java / net / pterodactylus / sone / template / ImageLinkFilterTest.java
index 20d2362..4640d9c 100644 (file)
@@ -47,6 +47,7 @@ public class ImageLinkFilterTest {
        @Before
        public void setupImage() {
                when(image.getId()).thenReturn("image-id");
+               when(image.getInternalId()).thenReturn("internal-image-id");
                when(image.getKey()).thenReturn("image-key");
                when(image.isInserted()).thenReturn(true);
                when(image.getWidth()).thenReturn(640);
@@ -61,7 +62,7 @@ public class ImageLinkFilterTest {
                String result = String.valueOf(imageLinkFilter.format(templateContext, image, ImmutableMap.<String, Object>of()));
                Element imageElement = getSingleElement(result);
                assertThat(imageElement.attr("class"), is(""));
-               assertThat(imageElement.attr("src"), is("getImage.html?image=image-id"));
+               assertThat(imageElement.attr("src"), is("getImage.html?image=internal-image-id"));
                assertThat(imageElement.attr("title"), is("image title"));
                assertThat(imageElement.attr("alt"), is("image description"));
                assertThat(imageElement.attr("width"), is("640"));