mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
tests: Add a test suite for maybe_enqueue_notifications.
This ensures that as we expand the logic for under what circumstances email and push notifications should be sent, we can be confident about this code path always doing the right thing.
This commit is contained in:
@@ -660,6 +660,9 @@ def maybe_enqueue_notifications(user_profile_id, message_id, private_message,
|
||||
mentioned, stream_push_notify, stream_name,
|
||||
always_push_notify, idle):
|
||||
# type: (int, int, bool, bool, bool, Optional[str], bool, bool) -> Optional[Dict[str, bool]]
|
||||
"""This function has a complete unit test suite in
|
||||
`test_enqueue_notifications` that should be expanded as we add
|
||||
more features here."""
|
||||
notified = dict() # type: Dict[str, bool]
|
||||
|
||||
if (idle or always_push_notify) and (private_message or mentioned or stream_push_notify):
|
||||
|
||||
Reference in New Issue
Block a user