diff --git a/goofy-server/src/test/java/de/itvsh/goofy/common/binaryfile/BinaryFileControllerITCase.java b/goofy-server/src/test/java/de/itvsh/goofy/common/binaryfile/BinaryFileControllerITCase.java index eda05299438ced6951d8d6d8620c9d47f2191479..e4b736287cfd0d195b76fc185d305510158b582a 100644 --- a/goofy-server/src/test/java/de/itvsh/goofy/common/binaryfile/BinaryFileControllerITCase.java +++ b/goofy-server/src/test/java/de/itvsh/goofy/common/binaryfile/BinaryFileControllerITCase.java @@ -11,7 +11,6 @@ import java.util.List; import java.util.Map; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.mockito.Mock; @@ -29,8 +28,7 @@ import org.springframework.test.web.servlet.ResultActions; import de.itvsh.goofy.common.downloadtoken.DownloadTokenController; import de.itvsh.goofy.common.downloadtoken.DownloadTokenProperties; import de.itvsh.goofy.common.downloadtoken.DownloadTokenTestFactory; -import de.itvsh.goofy.common.file.OzgFileDataTestFactory; -import de.itvsh.goofy.common.file.OzgFileService; +import de.itvsh.goofy.common.file.OzgFileTestFactory; import de.itvsh.goofy.common.user.UserTestFactory; import io.jsonwebtoken.JwtBuilder; @@ -42,7 +40,7 @@ class BinaryFileControllerITCase { @SpyBean private BinaryFileController controller; @MockBean - private OzgFileService service; + private BinaryFileService service; @Autowired private MockMvc mockMvc; @Autowired @@ -58,7 +56,7 @@ class BinaryFileControllerITCase { @BeforeEach void init() { - when(service.getOzgFileData(any())).thenReturn(OzgFileDataTestFactory.create()); + when(service.getFile(any())).thenReturn(OzgFileTestFactory.create()); } @Test @@ -75,7 +73,6 @@ class BinaryFileControllerITCase { performRequest().andExpect(status().isForbidden()); } - @Disabled("OZG-2268 FIXME") @Test void shouldGetFile() throws Exception { setTokenToSecuriyContext(tokenBuilder.addClaims(createClaims(fileId)).compact()); @@ -105,7 +102,7 @@ class BinaryFileControllerITCase { @BeforeEach void init() { - when(service.getOzgFileData(any())).thenReturn(OzgFileDataTestFactory.create()); + when(service.getFile(any())).thenReturn(OzgFileTestFactory.create()); SecurityContextHolder.getContext().setAuthentication(authentication); } @@ -116,7 +113,6 @@ class BinaryFileControllerITCase { performRequest().andExpect(status().isUnauthorized()); } - @Disabled("OZG-2268 FIXME") @Test void shouldGetFile() throws Exception { when(authentication.isAuthenticated()).thenReturn(Boolean.TRUE);