public function WebhookPostTest::testWebhookPostNoAuth in Zoom API 8
Same name and namespace in other branches
- 2.0.x tests/src/Functional/WebhookPostTest.php \Drupal\Tests\zoomapi\Functional\WebhookPostTest::testWebhookPostNoAuth()
Post without authorization header. Access Denied.
File
- tests/
src/ Functional/ WebhookPostTest.php, line 67
Class
- WebhookPostTest
- Webhook post tests.
Namespace
Drupal\Tests\zoomapi\FunctionalCode
public function testWebhookPostNoAuth() {
$url = Url::fromRoute('zoomapi.webhooks')
->setAbsolute()
->toString();
$res = $this
->getHttpClient()
->post($url, [
'http_errors' => FALSE,
]);
$this
->assertEquals($res
->getStatusCode(), 403, 'Access Denied due to missing authorization header.');
}