Remove some unnecessary calls to clear the mail queue

These were not needed at the end of most tests for quite some time,
since rails clears them by default for controller and integration tests,
and also no longer required in system tests after #5691
This commit is contained in:
Andy Allan 2025-02-16 16:02:01 +00:00
parent 07965246f8
commit 31805df53f
11 changed files with 1 additions and 72 deletions

View file

@ -72,7 +72,6 @@ class DiaryCommentsControllerTest < ActionDispatch::IntegrationTest
assert_equal "[OpenStreetMap] #{other_user.display_name} commented on a diary entry", email.subject
assert_match(/New comment/, email.text_part.decoded)
assert_match(/New comment/, email.html_part.decoded)
ActionMailer::Base.deliveries.clear
assert_equal entry.id, comment.diary_entry_id
assert_equal other_user.id, comment.user_id
assert_equal "New comment", comment.body
@ -114,7 +113,6 @@ class DiaryCommentsControllerTest < ActionDispatch::IntegrationTest
assert_equal "[OpenStreetMap] #{other_user.display_name} commented on a diary entry", email.subject
assert_match %r{http://example.com/spam}, email.text_part.decoded
assert_match %r{http://example.com/spam}, email.html_part.decoded
ActionMailer::Base.deliveries.clear
assert_equal entry.id, comment.diary_entry_id
assert_equal other_user.id, comment.user_id
assert_equal spammy_text, comment.body