From ca4397736108aa5b2cdae5d1fae3f026a6837a83 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Sat, 9 Nov 2024 17:03:50 +0100 Subject: [PATCH] amend RestTests according to .uuid --- .../HsOfficeCoopAssetsTransactionControllerRestTest.java | 2 +- .../rbac/grant/RbacGrantControllerAcceptanceTest.java | 8 ++++---- .../hsadminng/rbac/role/RbacRoleControllerRestTest.java | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) 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 f00edff8..7fa7e3f5 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 @@ -49,7 +49,7 @@ class HsOfficeCoopAssetsTransactionControllerRestTest { enum BadRequestTestCases { MEMBERSHIP_UUID_MISSING( requestBody -> requestBody.without("membershipUuid"), - "[membershipUuid must not be null but is \"null\"]"), + "[membership.uuid must not be null but is \"null\"]"), TRANSACTION_TYPE_MISSING( requestBody -> requestBody.without("transactionType"), diff --git a/src/test/java/net/hostsharing/hsadminng/rbac/grant/RbacGrantControllerAcceptanceTest.java b/src/test/java/net/hostsharing/hsadminng/rbac/grant/RbacGrantControllerAcceptanceTest.java index 5906f3e3..0dff3e75 100644 --- a/src/test/java/net/hostsharing/hsadminng/rbac/grant/RbacGrantControllerAcceptanceTest.java +++ b/src/test/java/net/hostsharing/hsadminng/rbac/grant/RbacGrantControllerAcceptanceTest.java @@ -388,8 +388,8 @@ class RbacGrantControllerAcceptanceTest extends ContextBasedTest { .body(""" { "assumed": true, - "grantedRoleUuid": "%s", - "granteeSubjectUuid": "%s" + "grantedRole.uuid": "%s", + "granteeSubject.uuid": "%s" } """.formatted( grantedRole.getUuid(), @@ -424,8 +424,8 @@ class RbacGrantControllerAcceptanceTest extends ContextBasedTest { .body(""" { "assumed": true, - "grantedRoleUuid": "%s", - "granteeSubjectUuid": "%s" + "grantedRole.uuid": "%s", + "granteeSubject.uuid": "%s" } """.formatted( grantedRole.getUuid(), diff --git a/src/test/java/net/hostsharing/hsadminng/rbac/role/RbacRoleControllerRestTest.java b/src/test/java/net/hostsharing/hsadminng/rbac/role/RbacRoleControllerRestTest.java index 0f1abce6..a9f09345 100644 --- a/src/test/java/net/hostsharing/hsadminng/rbac/role/RbacRoleControllerRestTest.java +++ b/src/test/java/net/hostsharing/hsadminng/rbac/role/RbacRoleControllerRestTest.java @@ -76,8 +76,8 @@ class RbacRoleControllerRestTest { .andExpect(jsonPath("$[1].roleName", is("rbactest.customer#xxx:OWNER"))) .andExpect(jsonPath("$[2].roleName", is("rbactest.customer#xxx:ADMIN"))) .andExpect(jsonPath("$[2].uuid", is(customerXxxAdmin.getUuid().toString()))) - .andExpect(jsonPath("$[2].objectUuid", is(customerXxxAdmin.getObjectUuid().toString()))) - .andExpect(jsonPath("$[2].objectTable", is(customerXxxAdmin.getObjectTable().toString()))) - .andExpect(jsonPath("$[2].objectIdName", is(customerXxxAdmin.getObjectIdName().toString()))); + .andExpect(jsonPath("$[2].['object.uuid']", is(customerXxxAdmin.getObjectUuid().toString()))) + .andExpect(jsonPath("$[2].objectTable", is(customerXxxAdmin.getObjectTable()))) + .andExpect(jsonPath("$[2].objectIdName", is(customerXxxAdmin.getObjectIdName()))); } }