Skip to content

Commit

Permalink
元々作成していたテストの内容を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
Takuya-Sakai91 committed Oct 22, 2023
1 parent d603814 commit 76ffe0f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/mailers/activity_mailer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1099,4 +1099,19 @@ class ActivityMailerTest < ActionMailer::TestCase
assert_equal '[FBC] 相談部屋でkomagataさんからコメントがありました。', email.subject
assert_match(/コメント/, email.body.to_s)
end

test 'came_comment for admin with mail_notification off' do
admin = users(:komagata)
admin.update(mail_notification: false)

comment = comments(:commentOfTalk)

ActivityMailer.came_comment(
comment: comment,
message: "相談部屋で#{comment.sender.login_name}さんからコメントがありました。",
receiver: comment.receiver
).deliver_now

assert ActionMailer::Base.deliveries.empty?
end
end

0 comments on commit 76ffe0f

Please sign in to comment.