Summer Sale! All accounts are 50% off this week.

eskiesirius's avatar

Testing Slack On Demand Notification Always Pass

I have this code

Notification::route('slack', config("services.slack.url"))
                ->notify(new SendCustomSlackNotification($task))

and in my test

Notification::fake();
//something
Notification::assertSentTo(
            new AnonymousNotifiable, SendCustomSlackNotification::class
        );

this always pass even though there is no sending of notification

0 likes
1 reply

Please or to participate in this conversation.