From e46813bf9cdeed035ff2abbeb4be27838183344b Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Sat, 13 Apr 2024 11:13:57 +0200 Subject: [PATCH] cleanup --- ...HsBookingItemControllerAcceptanceTest.java | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemControllerAcceptanceTest.java b/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemControllerAcceptanceTest.java index a21fd863..25d4478f 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemControllerAcceptanceTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemControllerAcceptanceTest.java @@ -6,9 +6,7 @@ import io.restassured.http.ContentType; import net.hostsharing.hsadminng.HsadminNgApplication; import net.hostsharing.hsadminng.hs.office.debitor.HsOfficeDebitorRepository; import net.hostsharing.hsadminng.hs.office.test.ContextBasedTestWithCleanup; -import net.hostsharing.test.Accepts; import net.hostsharing.test.JpaAttempt; -import org.json.JSONException; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -53,7 +51,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup class ListBookingItems { @Test - void globalAdmin_canViewAllBookingItemsOfArbitraryDebitor() throws JSONException { + void globalAdmin_canViewAllBookingItemsOfArbitraryDebitor() { // given context("superuser-alex@hostsharing.net"); @@ -358,25 +356,6 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup } @Test - void bankAccountAdminUser_canNotDeleteRelatedBookingItem() { - context.define("superuser-alex@hostsharing.net"); - final var givenBookingItem = givenSomeTemporaryBookingItemForDebitorNumber(1000111); - - RestAssured // @formatter:off - .given() - .header("current-user", "bankaccount-admin@FirstGmbH.example.com") - .port(port) - .when() - .delete("http://localhost/api/hs/booking/items/" + givenBookingItem.getUuid()) - .then().log().body().assertThat() - .statusCode(403); // @formatter:on - - // then the given bookingItem is still there - assertThat(bookingItemRepo.findByUuid(givenBookingItem.getUuid())).isNotEmpty(); - } - - @Test - @Accepts({ "BookingItem:X(Access Control)" }) void normalUser_canNotDeleteUnrelatedBookingItem() { context.define("superuser-alex@hostsharing.net"); final var givenBookingItem = givenSomeTemporaryBookingItemForDebitorNumber(1000111);