Files
fizzy/test/models/notifier/popped_test.rb
T
Kevin McConnell 78b7fe0f3d Fix tests
2025-01-14 13:21:20 +00:00

20 lines
579 B
Ruby

require "test_helper"
class Notifier::PoppedTest < ActiveSupport::TestCase
test "creates a notification for each recipient" do
assert_difference -> { Notification.count }, 2 do
assert_difference -> { users(:david).notifications.count }, 1 do
assert_difference -> { users(:jz).notifications.count }, 1 do
Notifier.for(events(:shipping_popped)).generate
end
end
end
end
test "links to the bubble" do
Notifier.for(events(:shipping_popped)).generate
assert_equal bubbles(:shipping), Notification.last.resource
end
end