Fix tests for renamed fixtures and new stacked notifications

Clear assignee's existing notifications in setup since Notifier now
uses create_or_find_by instead of create, and reload the association
to avoid caching after destroy_all.

Update fixture references after rebase: use `logo_assignment_kevin`
as base notification and `logo_mentioned_david` for mention tests.
Update source to `logo_published` in tests that need generic card events.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Rosa Gutierrez
2026-02-20 18:38:43 +01:00
parent cefc20612a
commit 92cb749e16
8 changed files with 47 additions and 67 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ class NotificationDeliveryTest < ActiveSupport::TestCase
@card = cards(:logo)
@card.assignments.destroy_all
@assignee.notifications.destroy_all
stub_web_push_pool
@@ -55,7 +56,7 @@ class NotificationDeliveryTest < ActiveSupport::TestCase
end
end
notification = @assignee.notifications.last
notification = @assignee.notifications.reload.last
assert_not_nil notification, "Notification should be created for assignee"
bundle = @assignee.notification_bundles.pending.last