Commit 618718a
authored
Fix : notification filter test correct config key and assertion (#90)
The test was passing by accident due to two bugs that masked each other:
1. Wrong config key: Used 'failed-job-monitor.callback' instead of
'failed-job-monitor.notificationFilter', causing the filter to never
execute (config returned null, is_callable(null) = false, so default
behavior sent notification).
2. Wrong notification class: Asserted that AnotherNotification::class
was not sent, but the default notification class is Notification::class.
Since the filter didn't run, Notification::class was sent, and the
test checked for AnotherNotification::class (which wasn't sent), so
it passed incorrectly.
The test appeared to work but wasn't actually validating the filter
functionality. When the filter should return false (empty exception
message), the notification should not be sent, but the test wasn't
verifying this correctly.
Changes:
- Use correct config key 'failed-job-monitor.notificationFilter'
- Assert against the correct notification class Notification::class
Now the test properly validates that when notificationFilter returns
false, no notification is sent to the default Notifiable with the
default Notification class.1 parent c8ca730 commit 618718a
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
0 commit comments