mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Failed to save email template with pluralized subject
This commit is contained in:
@@ -214,6 +214,21 @@ RSpec.describe Admin::EmailTemplatesController do
|
||||
end
|
||||
end
|
||||
|
||||
context "when subject has plural keys" do
|
||||
it "doesn't update the subject" do
|
||||
old_subject = I18n.t('system_messages.pending_users_reminder.subject_template')
|
||||
expect(old_subject).to be_a(Hash)
|
||||
|
||||
put '/admin/customize/email_templates/system_messages.pending_users_reminder', params: {
|
||||
email_template: { subject: '', body: 'Lorem ipsum' }
|
||||
}, headers: headers
|
||||
|
||||
expect(response.status).to eq(200)
|
||||
|
||||
expect(I18n.t('system_messages.pending_users_reminder.subject_template')).to eq(old_subject)
|
||||
expect(I18n.t('system_messages.pending_users_reminder.text_body_template')).to eq('Lorem ipsum')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user