mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Explicitly disable webhook settings in tests
This commit is contained in:
parent
621d8500eb
commit
aefc53cfcf
|
@ -52,4 +52,13 @@ class SettingFactory extends Factory
|
|||
'webhook_channel' => '#it',
|
||||
]);
|
||||
}
|
||||
|
||||
public function withWebhookDisabled()
|
||||
{
|
||||
return $this->state(fn() => [
|
||||
'webhook_botname' => '',
|
||||
'webhook_endpoint' => '',
|
||||
'webhook_channel' => '',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,6 +61,8 @@ class AssetCheckoutWebhookNotificationTest extends TestCase
|
|||
{
|
||||
Notification::fake();
|
||||
|
||||
Setting::factory()->withWebhookDisabled()->create();
|
||||
|
||||
event(new CheckoutableCheckedOut(
|
||||
$this->createAsset(),
|
||||
$checkoutTarget(),
|
||||
|
|
|
@ -50,6 +50,8 @@ class LicenseCheckoutWebhookNotificationTest extends TestCase
|
|||
{
|
||||
Notification::fake();
|
||||
|
||||
Setting::factory()->withWebhookDisabled()->create();
|
||||
|
||||
event(new CheckoutableCheckedOut(
|
||||
LicenseSeat::factory()->create(),
|
||||
$checkoutTarget(),
|
||||
|
|
Loading…
Reference in a new issue