Skip to content

Commit

Permalink
chore: migrate deprecated and no longer working JSON path checks
Browse files Browse the repository at this point in the history
  • Loading branch information
bobeal committed Dec 18, 2024
1 parent 54678fd commit 1cb5b2b
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -534,7 +535,7 @@ class EntityAccessControlHandlerTests {
.bodyValue(requestPayload)
.exchange()
.expectStatus().isBadRequest
.expectBody().jsonPath("$.detail", "Bad request")
.expectBody().jsonPath("$.title").isEqualTo("Bad request")
}

@Test
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1cb5b2b

Please sign in to comment.