From 6b30d0f6f935d3481a18d3d0ed92b750b40de05b Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Tue, 29 Oct 2024 17:44:02 +0100 Subject: [PATCH] explicitly fetch Hostsharing eG in CreatePartner --- .../hs/office/scenarios/partner/CreatePartner.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/partner/CreatePartner.java b/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/partner/CreatePartner.java index 6f42b8e4..ec396cf3 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/partner/CreatePartner.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/partner/CreatePartner.java @@ -5,6 +5,9 @@ import net.hostsharing.hsadminng.hs.office.scenarios.UseCase; import net.hostsharing.hsadminng.hs.office.scenarios.ScenarioTest; import org.springframework.http.HttpStatus; +import static io.restassured.http.ContentType.JSON; +import static org.springframework.http.HttpStatus.OK; + public class CreatePartner extends UseCase { public CreatePartner(final ScenarioTest testSuite, final String resultAlias) { @@ -18,6 +21,12 @@ public class CreatePartner extends UseCase { @Override protected HttpResponse run() { + keep("Person: Hostsharing eG", () -> + httpGet("/api/hs/office/persons?name=Hostsharing+eG") + .expecting(OK).expecting(JSON), + response -> response.expectArrayElements(1).getFromBody("[0].uuid") + ); + keep("Person: %{tradeName}", () -> httpPost("/api/hs/office/persons", usingJsonBody(""" {