mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -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',
|
'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();
|
Notification::fake();
|
||||||
|
|
||||||
|
Setting::factory()->withWebhookDisabled()->create();
|
||||||
|
|
||||||
event(new CheckoutableCheckedOut(
|
event(new CheckoutableCheckedOut(
|
||||||
$this->createAsset(),
|
$this->createAsset(),
|
||||||
$checkoutTarget(),
|
$checkoutTarget(),
|
||||||
|
|
|
@ -50,6 +50,8 @@ class LicenseCheckoutWebhookNotificationTest extends TestCase
|
||||||
{
|
{
|
||||||
Notification::fake();
|
Notification::fake();
|
||||||
|
|
||||||
|
Setting::factory()->withWebhookDisabled()->create();
|
||||||
|
|
||||||
event(new CheckoutableCheckedOut(
|
event(new CheckoutableCheckedOut(
|
||||||
LicenseSeat::factory()->create(),
|
LicenseSeat::factory()->create(),
|
||||||
$checkoutTarget(),
|
$checkoutTarget(),
|
||||||
|
|
Loading…
Reference in a new issue