Fix failing test

This commit is contained in:
Nanne Baars
2020-03-09 11:57:07 +01:00
committed by Nanne Baars
parent 14022d88c9
commit bb6d06713f

View File

@ -75,8 +75,7 @@ public class ProfileUploadRetrievalTest extends LessonTest {
@Test @Test
public void unknownFileShouldGiveDirectoryContents() throws Exception { public void unknownFileShouldGiveDirectoryContents() throws Exception {
mockMvc.perform(get("/PathTraversal/random-picture?id=test")) mockMvc.perform(get("/PathTraversal/random-picture?id=test"))
.andExpect(status().is(200)) .andExpect(status().is(404))
.andExpect(content().string(containsString("cats/8.jpg"))) .andExpect(content().string(containsString("cats/8.jpg")));
.andExpect(content().contentTypeCompatibleWith(MediaType.IMAGE_JPEG));
} }
} }