Skip to content

Commit

Permalink
tests: use proper content type for no-auth test requests
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka committed May 6, 2024
1 parent eb14a68 commit 9ef0fe7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/ApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public function testNotAuth()
$path = str_replace('.{_format}', '', $path);
foreach ($route->getMethods() as $method) {
$client = self::createClient();
$response = $client->request($method, $path.'?sublibrary=1234');
$contentType = ($method === 'PATCH') ? 'application/merge-patch+json' : 'application/ld+json';
$response = $client->request($method, $path.'?sublibrary=1234', ['headers' => ['Content-Type' => $contentType]]);
$this->assertContains($response->getStatusCode(), [401, 404], $path);
}
}
Expand Down

0 comments on commit 9ef0fe7

Please sign in to comment.