add shouldRemoveOperationsContactFromPartner

This commit is contained in:
Michael Hoennig 2024-10-24 13:34:20 +02:00
parent 6a28968521
commit f7661b25dd
2 changed files with 30 additions and 0 deletions

View File

@ -12,6 +12,7 @@ import net.hostsharing.hsadminng.hs.office.usecases.partner.CreatePartner;
import net.hostsharing.hsadminng.hs.office.usecases.debitor.DeleteDebitor;
import net.hostsharing.hsadminng.hs.office.usecases.partner.DeletePartner;
import net.hostsharing.hsadminng.hs.office.usecases.partner.AddRepresentativeToPartner;
import net.hostsharing.hsadminng.hs.office.usecases.subscription.RemoveOperationsContactFromPartner;
import net.hostsharing.hsadminng.hs.office.usecases.subscription.SubscribeToMailinglist;
import net.hostsharing.hsadminng.hs.office.usecases.subscription.UnsubscribeFromMailinglist;
import net.hostsharing.hsadminng.rbac.test.JpaAttempt;
@ -78,6 +79,15 @@ class HsOfficeUseCasesTest extends UseCaseTest {
.keep();
}
@Test
@Order(1039)
@Requires("Operations-Contact: Dennis Krause for Test AG")
void shouldRemoveOperationsContactFromPartner() {
new RemoveOperationsContactFromPartner(this)
.given("operationContactRelationUuid", "%{Operations-Contact: Dennis Krause for Test AG}")
.doRun();
}
@Test
@Order(1090)
void shouldDeletePartner() {

View File

@ -0,0 +1,20 @@
package net.hostsharing.hsadminng.hs.office.usecases.subscription;
import net.hostsharing.hsadminng.hs.office.usecases.UseCase;
import net.hostsharing.hsadminng.hs.office.usecases.UseCaseTest;
import static org.springframework.http.HttpStatus.NO_CONTENT;
public class RemoveOperationsContactFromPartner extends UseCase<RemoveOperationsContactFromPartner> {
public RemoveOperationsContactFromPartner(final UseCaseTest testSuite) {
super(testSuite);
}
@Override
protected HttpResponse run() {
return httpDelete("/api/hs/office/relations/" + uuid("operationContactRelationUuid"))
.expecting(NO_CONTENT);
}
}