diff --git a/app/Notifications/Server/HetznerDeletionFailed.php b/app/Notifications/Server/HetznerDeletionFailed.php index bb452b054..a109a4360 100644 --- a/app/Notifications/Server/HetznerDeletionFailed.php +++ b/app/Notifications/Server/HetznerDeletionFailed.php @@ -17,8 +17,7 @@ public function __construct(public int $hetznerServerId, public int $teamId, pub public function via(object $notifiable): array { - - return $notifiable->getEnabledChannels('hetzner_deletion_failed'); + return $notifiable->getEnabledChannels('hetzner_deletion_failure'); } public function toMail(): MailMessage diff --git a/tests/Unit/HetznerDeletionFailedNotificationTest.php b/tests/Unit/HetznerDeletionFailedNotificationTest.php index 22d5e80db..bcd3f294e 100644 --- a/tests/Unit/HetznerDeletionFailedNotificationTest.php +++ b/tests/Unit/HetznerDeletionFailedNotificationTest.php @@ -19,7 +19,7 @@ ->and($notification->errorMessage)->toBe('Hetzner API error: Server not found'); }); -it('uses hetzner_deletion_failed event for channels', function () { +it('uses the always-send hetzner_deletion_failure event for channels', function () { $notification = new HetznerDeletionFailed( hetznerServerId: 12345, teamId: 1, @@ -28,7 +28,7 @@ $mockNotifiable = Mockery::mock(); $mockNotifiable->shouldReceive('getEnabledChannels') - ->with('hetzner_deletion_failed') + ->with('hetzner_deletion_failure') ->once() ->andReturn([]);