explicitly fetch Hostsharing eG in CreatePartner
This commit is contained in:
parent
77cf97ded9
commit
6b30d0f6f9
@ -5,6 +5,9 @@ import net.hostsharing.hsadminng.hs.office.scenarios.UseCase;
|
|||||||
import net.hostsharing.hsadminng.hs.office.scenarios.ScenarioTest;
|
import net.hostsharing.hsadminng.hs.office.scenarios.ScenarioTest;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
|
|
||||||
|
import static io.restassured.http.ContentType.JSON;
|
||||||
|
import static org.springframework.http.HttpStatus.OK;
|
||||||
|
|
||||||
public class CreatePartner extends UseCase<CreatePartner> {
|
public class CreatePartner extends UseCase<CreatePartner> {
|
||||||
|
|
||||||
public CreatePartner(final ScenarioTest testSuite, final String resultAlias) {
|
public CreatePartner(final ScenarioTest testSuite, final String resultAlias) {
|
||||||
@ -18,6 +21,12 @@ public class CreatePartner extends UseCase<CreatePartner> {
|
|||||||
@Override
|
@Override
|
||||||
protected HttpResponse run() {
|
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}", () ->
|
keep("Person: %{tradeName}", () ->
|
||||||
httpPost("/api/hs/office/persons", usingJsonBody("""
|
httpPost("/api/hs/office/persons", usingJsonBody("""
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user