Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Jun 13, 2019
1 parent 97d75bf commit 5e16ced
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/WebhookControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,23 @@ public function it_can_work_with_an_alternative_profile()
$this->assertCount(0, WebhookCall::get());
}

/** @test */
public function it_can_work_with_an_alternative_config()
{
Route::webhooks('incoming-webhooks-alternative-config', 'alternative-config');

$this
->postJson('incoming-webhooks-alternative-config', $this->payload, $this->headers)
->assertStatus(Response::HTTP_INTERNAL_SERVER_ERROR);

config()->set('webhook-client.0.name', 'alternative-config');

$this
->postJson('incoming-webhooks-alternative-config', $this->payload, $this->headers)
->assertSuccessful();

}

private function determineSignature(array $payload): string
{
$secret = config('webhook-client.0.signing_secret');
Expand Down

0 comments on commit 5e16ced

Please sign in to comment.