From 18d94163f3a88d62c7cf887a9e44e5cc42880e26 Mon Sep 17 00:00:00 2001 From: Aliaksei_Harbuz Date: Tue, 17 Sep 2024 16:44:41 +0300 Subject: [PATCH] MODEXPW-488 - fix tests --- src/test/java/org/folio/dew/BaseBatchTest.java | 3 +++ .../dew/controller/PermissionsSelfCheckControllerTest.java | 7 ------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/test/java/org/folio/dew/BaseBatchTest.java b/src/test/java/org/folio/dew/BaseBatchTest.java index 7204fdbe6..d09c21b23 100644 --- a/src/test/java/org/folio/dew/BaseBatchTest.java +++ b/src/test/java/org/folio/dew/BaseBatchTest.java @@ -28,6 +28,7 @@ import org.folio.dew.batch.ExportJobManagerSync; import org.folio.dew.client.ConsortiaClient; import org.folio.dew.client.SearchClient; +import org.folio.dew.client.UserPermissionsClient; import org.folio.dew.domain.dto.BatchIdsDto; import org.folio.dew.domain.dto.ConsortiumHolding; import org.folio.dew.domain.dto.ConsortiumHoldingCollection; @@ -115,6 +116,8 @@ public abstract class BaseBatchTest { private SearchClient searchClient; @MockBean private ConsortiaClient consortiaClient; + @MockBean + protected UserPermissionsClient userPermissionsClient; static { postgreDBContainer.start(); diff --git a/src/test/java/org/folio/dew/controller/PermissionsSelfCheckControllerTest.java b/src/test/java/org/folio/dew/controller/PermissionsSelfCheckControllerTest.java index 887f55dba..03a03a12c 100644 --- a/src/test/java/org/folio/dew/controller/PermissionsSelfCheckControllerTest.java +++ b/src/test/java/org/folio/dew/controller/PermissionsSelfCheckControllerTest.java @@ -3,11 +3,7 @@ import lombok.SneakyThrows; import org.folio.dew.BaseBatchTest; import org.folio.dew.batch.bulkedit.jobs.permissions.check.UserPermissions; -import org.folio.dew.client.UserPermissionsClient; import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.test.web.servlet.MockMvc; import java.util.List; @@ -19,9 +15,6 @@ class PermissionsSelfCheckControllerTest extends BaseBatchTest { - @MockBean - private UserPermissionsClient userPermissionsClient; - @Test @SneakyThrows void shouldReturnDesiredPermissions() {