From 1cb5b2bfc8802712604f26f6466d9631e198aa3d Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Wed, 18 Dec 2024 19:31:52 +0100 Subject: [PATCH] chore: migrate deprecated and no longer working JSON path checks --- .../authorization/web/EntityAccessControlHandlerTests.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/search-service/src/test/kotlin/com/egm/stellio/search/authorization/web/EntityAccessControlHandlerTests.kt b/search-service/src/test/kotlin/com/egm/stellio/search/authorization/web/EntityAccessControlHandlerTests.kt index a633bde93..645272abd 100644 --- a/search-service/src/test/kotlin/com/egm/stellio/search/authorization/web/EntityAccessControlHandlerTests.kt +++ b/search-service/src/test/kotlin/com/egm/stellio/search/authorization/web/EntityAccessControlHandlerTests.kt @@ -21,6 +21,7 @@ import com.egm.stellio.shared.util.AUTHZ_TEST_COMPOUND_CONTEXTS import com.egm.stellio.shared.util.AUTHZ_TEST_CONTEXT import com.egm.stellio.shared.util.AccessRight import com.egm.stellio.shared.util.AuthContextModel +import com.egm.stellio.shared.util.AuthContextModel.ALL_IAM_RIGHTS_TERMS import com.egm.stellio.shared.util.AuthContextModel.AUTH_PROP_SAP import com.egm.stellio.shared.util.AuthContextModel.AUTH_TERM_CAN_READ import com.egm.stellio.shared.util.AuthContextModel.AUTH_TERM_FAMILY_NAME @@ -534,7 +535,7 @@ class EntityAccessControlHandlerTests { .bodyValue(requestPayload) .exchange() .expectStatus().isBadRequest - .expectBody().jsonPath("$.detail", "Bad request") + .expectBody().jsonPath("$.title").isEqualTo("Bad request") } @Test @@ -689,10 +690,8 @@ class EntityAccessControlHandlerTests { .exchange() .expectStatus().isBadRequest .expectBody() - .jsonPath( - "$.detail", - "The parameter q only accepts as a value one or more of ${AuthContextModel.ALL_IAM_RIGHTS_TERMS}" - ) + .jsonPath("$.title") + .isEqualTo("The attrs parameter only accepts as a value one or more of $ALL_IAM_RIGHTS_TERMS") } @Test