Explicitly disable webhook settings in tests

This commit is contained in:
Marcus Moore 2023-03-30 16:40:21 -07:00
parent 621d8500eb
commit aefc53cfcf
No known key found for this signature in database
3 changed files with 13 additions and 0 deletions

View file

@ -52,4 +52,13 @@ class SettingFactory extends Factory
'webhook_channel' => '#it',
]);
}
public function withWebhookDisabled()
{
return $this->state(fn() => [
'webhook_botname' => '',
'webhook_endpoint' => '',
'webhook_channel' => '',
]);
}
}

View file

@ -61,6 +61,8 @@ class AssetCheckoutWebhookNotificationTest extends TestCase
{
Notification::fake();
Setting::factory()->withWebhookDisabled()->create();
event(new CheckoutableCheckedOut(
$this->createAsset(),
$checkoutTarget(),

View file

@ -50,6 +50,8 @@ class LicenseCheckoutWebhookNotificationTest extends TestCase
{
Notification::fake();
Setting::factory()->withWebhookDisabled()->create();
event(new CheckoutableCheckedOut(
LicenseSeat::factory()->create(),
$checkoutTarget(),