782259a678
Previously when an item was `created`, we'd track the event, update the summary text, and broadcast the notifications. But now that we have a draft state, we shold do all of this when it's published instead.
16 lines
435 B
Ruby
16 lines
435 B
Ruby
require "test_helper"
|
|
|
|
class Notifier::PublishedTest < ActiveSupport::TestCase
|
|
test "creates a notification for each recipient" do
|
|
notifications = Notifier.for(events(:logo_published)).generate
|
|
|
|
assert_equal users(:kevin, :jz).sort, notifications.map(&:user).sort
|
|
end
|
|
|
|
test "links to the bubble" do
|
|
Notifier.for(events(:logo_published)).generate
|
|
|
|
assert_equal bubbles(:logo), Notification.last.resource
|
|
end
|
|
end
|