fix: Send assignment notifications only to the assignee(s)
ref: https://37s.fizzy.37signals.com/buckets/693169850/bubbles/999008619
This commit is contained in:
@@ -1,2 +1,6 @@
|
||||
class Notifier::Assigned < Notifier
|
||||
private
|
||||
def recipients
|
||||
event.assignees
|
||||
end
|
||||
end
|
||||
|
||||
@@ -33,4 +33,10 @@ class NotifierTest < ActiveSupport::TestCase
|
||||
|
||||
assert_equal bubbles(:logo), Notification.last.resource
|
||||
end
|
||||
|
||||
test "for assignment events only create a notification for the assignee" do
|
||||
notifications = Notifier.for(events(:logo_assignment_jz)).generate
|
||||
|
||||
assert_equal [ users(:jz) ], notifications.map(&:user)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user