From a0560d2bfd2113353a9b31fd6ef46818f8410c73 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Fri, 13 Dec 2024 10:00:24 +0100 Subject: [PATCH] fix contacts?emailAddress -> contacts?emailAddressRegEx in scenario test --- .../hsadminng/hs/office/contact/HsOfficeContactController.java | 1 - .../SubscribeExistingPersonAndContactToMailinglist.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/net/hostsharing/hsadminng/hs/office/contact/HsOfficeContactController.java b/src/main/java/net/hostsharing/hsadminng/hs/office/contact/HsOfficeContactController.java index 744a9342..548282d3 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/office/contact/HsOfficeContactController.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/office/contact/HsOfficeContactController.java @@ -48,7 +48,6 @@ public class HsOfficeContactController implements HsOfficeContactsApi { ? contactRepo.findContactByEmailAddressRegEx(emailAddressRegEx) : contactRepo.findContactByOptionalCaptionLike(caption); - final var resources = mapper.mapList(entities, HsOfficeContactResource.class); return ResponseEntity.ok(resources); } diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/subscription/SubscribeExistingPersonAndContactToMailinglist.java b/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/subscription/SubscribeExistingPersonAndContactToMailinglist.java index f018c454..e3f10185 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/subscription/SubscribeExistingPersonAndContactToMailinglist.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/subscription/SubscribeExistingPersonAndContactToMailinglist.java @@ -34,7 +34,7 @@ public class SubscribeExistingPersonAndContactToMailinglist extends UseCase - httpGet("/api/hs/office/contacts?emailAddress=%{subscriberEMailAddress}") + httpGet("/api/hs/office/contacts?emailAddressRegEx=%{subscriberEMailAddress}") .expecting(HttpStatus.OK).expecting(ContentType.JSON), response -> response.expectArrayElements(1).getFromBody("[0].uuid"), "In real scenarios there are most likely multiple results and you have to choose the right one."