Fixed IT.

This commit is contained in:
Michael Spalti
2021-09-04 17:10:46 -07:00
parent 618d72b4b9
commit 015f1f2ac9

View File

@@ -94,6 +94,7 @@ public class IIIFRestRepositoryIT extends AbstractControllerIntegrationTest {
String bitstreamContent = "ThisIsSomeDummyText";
Bitstream bitstream1 = null;
Bitstream bitstream2 = null;
try (InputStream is = IOUtils.toInputStream(bitstreamContent, CharEncoding.UTF_8)) {
bitstream1 = BitstreamBuilder
.createBitstream(context, publicItem1, is, IIIFBundle)
@@ -102,6 +103,14 @@ public class IIIFRestRepositoryIT extends AbstractControllerIntegrationTest {
.build();
}
try (InputStream is = IOUtils.toInputStream(bitstreamContent, CharEncoding.UTF_8)) {
bitstream2 = BitstreamBuilder
.createBitstream(context, publicItem1, is, "THUMBNAIL")
.withName("Bitstream2")
.withMimeType("image/jpeg")
.build();
}
context.restoreAuthSystemState();
// Default canvas size and label.
@@ -110,7 +119,7 @@ public class IIIFRestRepositoryIT extends AbstractControllerIntegrationTest {
.andExpect(jsonPath("$.@context", is("http://iiif.io/api/presentation/2/context.json")))
.andExpect(jsonPath("$.service.profile", is("http://iiif.io/api/search/0/search")))
.andExpect(jsonPath("$.thumbnail.@id", Matchers.containsString("/iiif/2/"
+ bitstream1.getID())))
+ bitstream2.getID())))
.andExpect(jsonPath("$.sequences[0].canvases[0].@id",
Matchers.containsString("/iiif/" + publicItem1.getID() + "/canvas/c0")))
.andExpect(jsonPath("$.sequences[0].canvases[0].label", is("Page 1")))