introduce-booking-module #41
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user