Add coverage for UserMailer#terms_of_service_changed mailer (#33242)

This commit is contained in:
Matt Jankowski 2024-12-10 09:45:40 -05:00 committed by GitHub
parent 19c6cb82f6
commit 66266ec6fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -272,4 +272,16 @@ RSpec.describe UserMailer do
.and(have_body_text(I18n.t('user_mailer.backup_ready.explanation')))
end
end
describe '#terms_of_service_changed' do
let(:terms) { Fabricate :terms_of_service }
let(:mail) { described_class.terms_of_service_changed(receiver, terms) }
it 'renders terms_of_service_changed mail' do
expect(mail)
.to be_present
.and(have_subject(I18n.t('user_mailer.terms_of_service_changed.subject')))
.and(have_body_text(I18n.t('user_mailer.terms_of_service_changed.changelog')))
end
end
end