mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-28 03:11:40 -05:00
Fix test that doesn't account for notifications being created in a different order
This commit is contained in:
@@ -106,7 +106,9 @@ def test_send_notification_to_service_users_sends_to_active_users_only(
|
||||
|
||||
send_notification_to_service_users(service_id=service.id, template_id=template.id)
|
||||
notifications = Notification.query.all()
|
||||
notifications_recipients = [notification.to for notification in notifications]
|
||||
|
||||
assert Notification.query.count() == 2
|
||||
|
||||
assert pending_user.email_address not in [n.to for n in notifications]
|
||||
assert pending_user.email_address not in notifications_recipients
|
||||
assert first_active_user.email_address in notifications_recipients
|
||||
assert second_active_user.email_address in notifications_recipients
|
||||
|
||||
Reference in New Issue
Block a user