mirror of
https://github.com/mastodon/mastodon.git
synced 2026-08-23 11:54:42 -05:00
Add coverage for missing user scenario in user/appeal mailers (#39496)
This commit is contained in:
@@ -210,6 +210,15 @@ RSpec.describe UserMailer do
|
||||
expect(mail.text_part.body)
|
||||
.to match(I18n.t('user_mailer.appeal_approved.title'))
|
||||
end
|
||||
|
||||
context 'when user is missing' do
|
||||
let(:mail) { described_class.appeal_approved(nil, appeal) }
|
||||
|
||||
it 'handles missing value without sending' do
|
||||
expect { mail.deliver }
|
||||
.to_not send_email
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#appeal_rejected' do
|
||||
@@ -222,6 +231,15 @@ RSpec.describe UserMailer do
|
||||
expect(mail.text_part.body)
|
||||
.to match(I18n.t('user_mailer.appeal_rejected.title'))
|
||||
end
|
||||
|
||||
context 'when user is missing' do
|
||||
let(:mail) { described_class.appeal_rejected(nil, appeal) }
|
||||
|
||||
it 'handles missing value without sending' do
|
||||
expect { mail.deliver }
|
||||
.to_not send_email
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#two_factor_enabled' do
|
||||
|
||||
Reference in New Issue
Block a user