Skip to content

Commit 995271b

Browse files
committed
fix path traversal test
1 parent 6a2fc8d commit 995271b

File tree

1 file changed

+2
-1
lines changed
  • commercetools/commercetools-sdk-java-api/src/integrationTest/java/commercetools/cart

1 file changed

+2
-1
lines changed

commercetools/commercetools-sdk-java-api/src/integrationTest/java/commercetools/cart/CartQueryTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import commercetools.discount_code.DiscountCodeFixtures;
1616
import commercetools.utils.CommercetoolsTestUtils;
1717

18+
import io.vrap.rmf.base.client.error.ForbiddenException;
1819
import io.vrap.rmf.base.client.error.NotFoundException;
1920

2021
import org.assertj.core.api.Assertions;
@@ -156,7 +157,7 @@ public void expandDiscountCodeReference() {
156157
@Test
157158
public void pathTraversal() {
158159
CartsFixtures.withCart(cart -> {
159-
NotFoundException e = org.junit.jupiter.api.Assertions.assertThrows(NotFoundException.class, () -> {
160+
ForbiddenException e = org.junit.jupiter.api.Assertions.assertThrows(ForbiddenException.class, () -> {
160161
CommercetoolsTestUtils.getProjectApiRoot().carts().withId("../categories").get().executeBlocking();
161162
});
162163
Assertions.assertThat(e.getMessage()).contains("..%2Fcategories");

0 commit comments

Comments
 (0)