From ff113ef523f77fb887b939a23de3936f603812a6 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Thu, 17 Oct 2024 14:56:58 -0700 Subject: [PATCH] typo fix --- app/Notifications/CheckinLicenseSeatNotification.php | 3 ++- tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php | 2 +- tests/Support/AssertsAgainstSlackNotifications.php | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Notifications/CheckinLicenseSeatNotification.php b/app/Notifications/CheckinLicenseSeatNotification.php index 114011bd72..74018af7c9 100644 --- a/app/Notifications/CheckinLicenseSeatNotification.php +++ b/app/Notifications/CheckinLicenseSeatNotification.php @@ -6,6 +6,7 @@ use App\Models\LicenseSeat; use App\Models\Setting; use App\Models\User; use Illuminate\Bus\Queueable; +use Illuminate\Notifications\Channels\SlackWebhookChannel; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Messages\SlackMessage; use Illuminate\Notifications\Notification; @@ -58,7 +59,7 @@ class CheckinLicenseSeatNotification extends Notification } if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) { - $notifyBy[] = 'slack'; + $notifyBy[] = SlackWebhookChannel::class; } return $notifyBy; diff --git a/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php b/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php index 980b390ad7..af9b286725 100644 --- a/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php @@ -170,7 +170,7 @@ class AccessoryCheckoutTest extends TestCase 'checkout_to_type' => 'user', ]); - Mail::assertNotSent(CheckoutAccessoryMail::class, function ($mail) use ($user) { + Mail::assertSent(CheckoutAccessoryMail::class, function ($mail) use ($user) { return $mail->hasTo($user->email); }); } diff --git a/tests/Support/AssertsAgainstSlackNotifications.php b/tests/Support/AssertsAgainstSlackNotifications.php index 11e6beea2d..e52f39a7e5 100644 --- a/tests/Support/AssertsAgainstSlackNotifications.php +++ b/tests/Support/AssertsAgainstSlackNotifications.php @@ -14,6 +14,7 @@ trait AssertsAgainstSlackNotifications new AnonymousNotifiable, $notificationClass, function ($notification, $channels, $notifiable) { + dd($notification); return $notifiable->routes['slack'] === Setting::getSettings()->webhook_endpoint; } );