From 6152c65282bcf23b398468123f83d641accca81e Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Thu, 11 Apr 2024 14:40:44 +0200 Subject: [PATCH] fix component scan in ContextIntegrationTests --- .../hsadminng/rbac/context/ContextIntegrationTests.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/java/net/hostsharing/hsadminng/rbac/context/ContextIntegrationTests.java b/src/test/java/net/hostsharing/hsadminng/rbac/context/ContextIntegrationTests.java index 774f5847..11cda37f 100644 --- a/src/test/java/net/hostsharing/hsadminng/rbac/context/ContextIntegrationTests.java +++ b/src/test/java/net/hostsharing/hsadminng/rbac/context/ContextIntegrationTests.java @@ -1,6 +1,7 @@ package net.hostsharing.hsadminng.rbac.context; import net.hostsharing.hsadminng.context.Context; +import net.hostsharing.hsadminng.mapper.Mapper; import net.hostsharing.hsadminng.rbac.test.Array; import net.hostsharing.hsadminng.rbac.test.JpaAttempt; import org.junit.jupiter.api.Test; @@ -16,7 +17,7 @@ import jakarta.servlet.http.HttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; @DataJpaTest -@ComponentScan(basePackageClasses = { Context.class, JpaAttempt.class }) +@ComponentScan(basePackageClasses = { Context.class, JpaAttempt.class, Mapper.class }) @DirtiesContext class ContextIntegrationTests { @@ -24,6 +25,7 @@ class ContextIntegrationTests { private Context context; @MockBean + @SuppressWarnings("unused") // the bean must be present, even though it's not used directly private HttpServletRequest request; @Autowired