Add ability to email announcements to all users (#33928)
This commit is contained in:
parent
d2ce9a6064
commit
5a100bf38f
20 changed files with 275 additions and 11 deletions
|
@ -317,4 +317,16 @@ RSpec.describe UserMailer do
|
|||
.and(have_body_text(I18n.t('user_mailer.terms_of_service_changed.changelog')))
|
||||
end
|
||||
end
|
||||
|
||||
describe '#announcement_published' do
|
||||
let(:announcement) { Fabricate :announcement }
|
||||
let(:mail) { described_class.announcement_published(receiver, announcement) }
|
||||
|
||||
it 'renders announcement_published mail' do
|
||||
expect(mail)
|
||||
.to be_present
|
||||
.and(have_subject(I18n.t('user_mailer.announcement_published.subject')))
|
||||
.and(have_body_text(I18n.t('user_mailer.announcement_published.description', domain: Rails.configuration.x.local_domain)))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue