Fixed: ensure content-type is present when deleting membership
This commit is contained in:
parent
1a3f89ec4f
commit
4536e0907d
|
@ -494,7 +494,10 @@ class Api
|
||||||
|
|
||||||
private function delete(string $url, string $error): void
|
private function delete(string $url, string $error): void
|
||||||
{
|
{
|
||||||
$response = $this->http()->delete($this->url.$url);
|
$response = $this->http()->withHeaders([
|
||||||
|
'content-type' => 'application/json',
|
||||||
|
'accept' => 'application/json',
|
||||||
|
])->delete($this->url.$url);
|
||||||
|
|
||||||
if (null === $response->json()) {
|
if (null === $response->json()) {
|
||||||
$this->exception($error, $url, []);
|
$this->exception($error, $url, []);
|
||||||
|
|
|
@ -176,7 +176,7 @@ class MembershipFake extends Fake
|
||||||
{
|
{
|
||||||
$url = "https://nami.dpsg.de/ica/rest/nami/zugeordnete-taetigkeiten/filtered-for-navigation/gruppierung-mitglied/mitglied/{$memberId}/{$membershipId}";
|
$url = "https://nami.dpsg.de/ica/rest/nami/zugeordnete-taetigkeiten/filtered-for-navigation/gruppierung-mitglied/mitglied/{$memberId}/{$membershipId}";
|
||||||
Http::assertSent(function ($request) use ($url) {
|
Http::assertSent(function ($request) use ($url) {
|
||||||
return $request->url() === $url && 'DELETE' === $request->method();
|
return $request->hasHeader('content-type', 'application/json') && $request->hasHeader('content-type', 'application/json') && $request->url() === $url && 'DELETE' === $request->method();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue