From 9531f6a881bac0b0e2f1f84862ba2d4633aa76e0 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Sat, 9 Nov 2024 20:54:59 +0100 Subject: [PATCH] amend RestTests according to .uuid - wrong error-message mapping in SpringValidation --- .../coopassets/HsOfficeCoopAssetsTransactionController.java | 1 - .../HsOfficeCoopAssetsTransactionControllerRestTest.java | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/hostsharing/hsadminng/hs/office/coopassets/HsOfficeCoopAssetsTransactionController.java b/src/main/java/net/hostsharing/hsadminng/hs/office/coopassets/HsOfficeCoopAssetsTransactionController.java index 9154b8f0..b8da7580 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/office/coopassets/HsOfficeCoopAssetsTransactionController.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/office/coopassets/HsOfficeCoopAssetsTransactionController.java @@ -77,7 +77,6 @@ public class HsOfficeCoopAssetsTransactionController implements HsOfficeCoopAsse @Override @Transactional(readOnly = true) - public ResponseEntity getCoopAssetTransactionByUuid( final String currentSubject, final String assumedRoles, final UUID assetTransactionUuid) { diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/coopassets/HsOfficeCoopAssetsTransactionControllerRestTest.java b/src/test/java/net/hostsharing/hsadminng/hs/office/coopassets/HsOfficeCoopAssetsTransactionControllerRestTest.java index b64e0cae..b7f44b35 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/coopassets/HsOfficeCoopAssetsTransactionControllerRestTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/coopassets/HsOfficeCoopAssetsTransactionControllerRestTest.java @@ -48,8 +48,8 @@ class HsOfficeCoopAssetsTransactionControllerRestTest { enum BadRequestTestCases { MEMBERSHIP_UUID_MISSING( - requestBody -> requestBody.without("membershipUuid"), - "[membership.uuid must not be null but is \"null\"]"), + requestBody -> requestBody.without("membership.uuid"), + "[membershipUuid must not be null but is \"null\"]"), // TODO.impl: should be membership.uuid, Spring validation-problem? TRANSACTION_TYPE_MISSING( requestBody -> requestBody.without("transactionType"),