From 87b1407e3947cfacb24243768b0d7de58002bc8e Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 7 Nov 2024 11:07:06 +0100 Subject: [PATCH] Ensure subscriberClient is not called without auth --- .../a2j/integration/ReceiverIntegrationTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/java/de/bund/digitalservice/a2j/integration/ReceiverIntegrationTest.java b/src/test/java/de/bund/digitalservice/a2j/integration/ReceiverIntegrationTest.java index d455a3c..1c24688 100644 --- a/src/test/java/de/bund/digitalservice/a2j/integration/ReceiverIntegrationTest.java +++ b/src/test/java/de/bund/digitalservice/a2j/integration/ReceiverIntegrationTest.java @@ -2,6 +2,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import com.fasterxml.jackson.core.JsonProcessingException; @@ -89,5 +91,6 @@ void shouldSecureCallbackWithoutAuthorization() { String.class); assertEquals(HttpStatus.UNAUTHORIZED.value(), response.getStatusCode().value()); + verify(subscriberClient, never()).requestSubmission(any(SubmissionForPickup.class)); } }