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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user