introduce-booking-module #41

Merged
hsh-michaelhoennig merged 21 commits from introduce-booking-module into master 2024-04-16 11:21:35 +02:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 33cffed85b - Show all commits

View File

@ -60,7 +60,7 @@ public class HsBookingItemController implements HsBookingItemsApi {
final var uri =
MvcUriComponentsBuilder.fromController(getClass())
.path("/api/hs/office/bookingItems/{id}")
.path("/api/hs/booking/items/{id}")
.buildAndExpand(saved.getUuid())
.toUri();
final var mapped = mapper.map(saved, HsBookingItemResource.class, ENTITY_TO_RESOURCE_POSTMAPPER);

View File

@ -23,7 +23,7 @@ import java.util.UUID;
import static java.util.Map.entry;
import static net.hostsharing.hsadminng.rbac.test.JsonMatcher.lenientlyEquals;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.Matchers.startsWith;
import static org.hamcrest.Matchers.matchesRegex;
@SpringBootTest(
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
@ -140,7 +140,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup
"resources": { "CPU": 12 }
}
"""))
.header("Location", startsWith("http://localhost"))
.header("Location", matchesRegex("http://localhost:[1-9][0-9]*/api/hs/booking/items/[^/]*"))
.extract().header("Location"); // @formatter:on
// finally, the new bookingItem can be accessed under the generated UUID