feature/use-case-acceptance-tests-2 #117
@ -16,14 +16,14 @@ public class AmendContactData extends UseCase<AmendContactData> {
|
|||||||
@Override
|
@Override
|
||||||
protected HttpResponse run() {
|
protected HttpResponse run() {
|
||||||
|
|
||||||
obtain("partnerContactuid", () ->
|
obtain("partnerContactUuid", () ->
|
||||||
httpGet("/api/hs/office/relations?relationType=PARTNER&personData=" + uriEncoded("%{partnerName}"))
|
httpGet("/api/hs/office/relations?relationType=PARTNER&personData=" + uriEncoded("%{partnerName}"))
|
||||||
.expecting(OK).expecting(JSON),
|
.expecting(OK).expecting(JSON),
|
||||||
response -> response.expectArrayElements(1).getFromBody("[0].contact.uuid"),
|
response -> response.expectArrayElements(1).getFromBody("[0].contact.uuid"),
|
||||||
"In production data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
"In production data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
||||||
);
|
);
|
||||||
|
|
||||||
httpPatch("/api/hs/office/contacts/%{partnerContactuid}", usingJsonBody("""
|
httpPatch("/api/hs/office/contacts/%{partnerContactUuid}", usingJsonBody("""
|
||||||
{
|
{
|
||||||
"caption": ${newContactCaption???},
|
"caption": ${newContactCaption???},
|
||||||
"postalAddress": ${newPostalAddress???},
|
"postalAddress": ${newPostalAddress???},
|
||||||
|
Loading…
Reference in New Issue
Block a user