Skip to content

A free open source IT asset/license management system

Change enableWebhook to enableSlackWebhook

Marcus Moorebc0a7542ac96
diff --git a/tests/Feature/Notifications/AccessoryWebhookTest.php b/tests/Feature/Notifications/AccessoryWebhookTest.php
index a1db59b985..2e3ef999ba 100644
--- a/tests/Feature/Notifications/AccessoryWebhookTest.php
+++ b/tests/Feature/Notifications/AccessoryWebhookTest.php
@@ -22,7 +22,7 @@ class AccessoryWebhookTest extends TestCase
{
Notification::fake();
- $this->settings->enableWebhook();
+ $this->settings->enableSlackWebhook();
event(new CheckoutableCheckedOut(
Accessory::factory()->appleBtKeyboard()->create(),
@@ -60,7 +60,7 @@ class AccessoryWebhookTest extends TestCase
{
Notification::fake();
- $this->settings->enableWebhook();
+ $this->settings->enableSlackWebhook();
event(new CheckoutableCheckedIn(
Accessory::factory()->appleBtKeyboard()->create(),
diff --git a/tests/Feature/Notifications/AssetWebhookTest.php b/tests/Feature/Notifications/AssetWebhookTest.php
index ae45a4caa4..158bced664 100644
--- a/tests/Feature/Notifications/AssetWebhookTest.php
+++ b/tests/Feature/Notifications/AssetWebhookTest.php
@@ -33,7 +33,7 @@ class AssetWebhookTest extends TestCase
{
Notification::fake();
- $this->settings->enableWebhook();
+ $this->settings->enableSlackWebhook();
event(new CheckoutableCheckedOut(
$this->createAsset(),
@@ -73,7 +73,7 @@ class AssetWebhookTest extends TestCase
{
Notification::fake();
- $this->settings->enableWebhook();
+ $this->settings->enableSlackWebhook();
event(new CheckoutableCheckedIn(
$this->createAsset(),
diff --git a/tests/Feature/Notifications/ComponentWebhookTest.php b/tests/Feature/Notifications/ComponentWebhookTest.php
index 8f3a51b15d..2e2a535219 100644
--- a/tests/Feature/Notifications/ComponentWebhookTest.php
+++ b/tests/Feature/Notifications/ComponentWebhookTest.php
@@ -20,7 +20,7 @@ class ComponentWebhookTest extends TestCase
{
Notification::fake();
- $this->settings->enableWebhook();
+ $this->settings->enableSlackWebhook();
event(new CheckoutableCheckedOut(
Component::factory()->ramCrucial8()->create(),
@@ -36,7 +36,7 @@ class ComponentWebhookTest extends TestCase
{
Notification::fake();
- $this->settings->enableWebhook();
+ $this->settings->enableSlackWebhook();
event(new CheckoutableCheckedIn(
Component::factory()->ramCrucial8()->create(),
diff --git a/tests/Feature/Notifications/ConsumableWebhookTest.php b/tests/Feature/Notifications/ConsumableWebhookTest.php
index 854fdf5341..2815731bd2 100644
--- a/tests/Feature/Notifications/ConsumableWebhookTest.php
+++ b/tests/Feature/Notifications/ConsumableWebhookTest.php
@@ -20,7 +20,7 @@ class ConsumableWebhookTest extends TestCase
{
Notification::fake();
- $this->settings->enableWebhook();
+ $this->settings->enableSlackWebhook();
event(new CheckoutableCheckedOut(
Consumable::factory()->cardstock()->create(),
diff --git a/tests/Feature/Notifications/LicenseWebhookTest.php b/tests/Feature/Notifications/LicenseWebhookTest.php
index 4313ff69d4..24ec53a75e 100644
--- a/tests/Feature/Notifications/LicenseWebhookTest.php
+++ b/tests/Feature/Notifications/LicenseWebhookTest.php
@@ -32,7 +32,7 @@ class LicenseWebhookTest extends TestCase
{
Notification::fake();
- $this->settings->enableWebhook();
+ $this->settings->enableSlackWebhook();
event(new CheckoutableCheckedOut(
LicenseSeat::factory()->create(),
@@ -72,7 +72,7 @@ class LicenseWebhookTest extends TestCase
{
Notification::fake();
- $this->settings->enableWebhook();
+ $this->settings->enableSlackWebhook();
event(new CheckoutableCheckedIn(
LicenseSeat::factory()->create(),
diff --git a/tests/Support/Settings.php b/tests/Support/Settings.php
index d5aad59ada..3104851152 100644
--- a/tests/Support/Settings.php
+++ b/tests/Support/Settings.php
@@ -39,9 +39,10 @@ class Settings
return $this->update(['full_multiple_companies_support' => 0]);
}
- public function enableWebhook(): Settings
+ public function enableSlackWebhook(): Settings
{
return $this->update([
+ 'webhook_selected' => 'slack',
'webhook_botname' => 'SnipeBot5000',
'webhook_endpoint' => 'https://hooks.slack.com/services/NZ59/Q446/672N',
'webhook_channel' => '#it',
@@ -51,6 +52,7 @@ class Settings
public function disableWebhook(): Settings
{
return $this->update([
+ 'webhook_selected' => '',
'webhook_botname' => '',
'webhook_endpoint' => '',
'webhook_channel' => '',