Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Dec 2, 2024
1 parent afc55d2 commit d332900
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/Feature/NotificationOverridesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ public function test_custom_notifications_are_sent_if_specified()

Notification::assertSentOnDemand(CustomLongWaitDetectedNotification::class);
}

public function test_normal_notifications_are_sent_if_not_specified()
{
Notification::fake();

Horizon::routeMailNotificationsTo('taylor@laravel.com');

event(new LongWaitDetected('redis', 'test-queue-2', 60));

Notification::assertSentOnDemand(LongWaitDetectedNotification::class);
}
}

class CustomLongWaitDetectedNotification extends LongWaitDetectedNotification implements LongWaitDetectedNotificationContract
Expand Down

0 comments on commit d332900

Please sign in to comment.