Fix tests

This commit is contained in:
Kevin McConnell
2025-01-14 13:08:13 +00:00
parent ab154f2f35
commit 78b7fe0f3d
5 changed files with 41 additions and 11 deletions
+19
View File
@@ -0,0 +1,19 @@
require "test_helper"
class Notifier::CommentedTest < ActiveSupport::TestCase
test "creates a notification for each recipient" do
assert_difference -> { Notification.count }, 2 do
assert_difference -> { users(:kevin).notifications.count }, 1 do
assert_difference -> { users(:jz).notifications.count }, 1 do
Notifier.for(events(:layout_commented)).generate
end
end
end
end
test "links to the bubble" do
Notifier.for(events(:layout_commented)).generate
assert_equal comments(:layout_overflowing_david), Notification.last.resource
end
end