Spaces:
Sleeping
Sleeping
Claude Sonnet 4.6
feat(backend): replace backend with peter branch + Emergency Care integration
6773345 Download tests/Feature/CalendlyWebhookTest.php from nyakslamo/mdn-backend: direct link, hf CLI and curl.
- Browser
- Download file 899 Bytes
-
https://huggingface.co/spaces/nyakslamo/mdn-backend/resolve/main/tests/Feature/CalendlyWebhookTest.php
- Command line
-
hf download hf://spaces/nyakslamo/mdn-backend/tests/Feature/CalendlyWebhookTest.php
-
curl -L -o CalendlyWebhookTest.php https://huggingface.co/spaces/nyakslamo/mdn-backend/resolve/main/tests/Feature/CalendlyWebhookTest.php
899 Bytes
| namespace Tests\Feature; | |
| use Tests\TestCase; | |
| class CalendlyWebhookTest extends TestCase | |
| { | |
| public function test_calendly_webhook_requires_configured_secret(): void | |
| { | |
| config(['app.calendly_webhook_secret' => null]); | |
| $response = $this->postJson('/api/v1/calendly/webhooks', ['event' => 'invitee.created']); | |
| $response->assertStatus(503) | |
| ->assertJsonPath('error.code', 'CALENDLY_WEBHOOK_SECRET_REQUIRED'); | |
| } | |
| public function test_calendly_webhook_rejects_invalid_signature(): void | |
| { | |
| config(['app.calendly_webhook_secret' => 'test-secret']); | |
| $response = $this->withHeader('Calendly-Webhook-Signature', 'v1=invalid') | |
| ->postJson('/api/v1/calendly/webhooks', ['event' => 'invitee.created']); | |
| $response->assertStatus(401) | |
| ->assertJsonPath('error.code', 'INVALID_CALENDLY_SIGNATURE'); | |
| } | |
| } | |