diff --git a/app/controllers/admin/email_templates_controller.rb b/app/controllers/admin/email_templates_controller.rb index feae4de5d10..6162fea4ef7 100644 --- a/app/controllers/admin/email_templates_controller.rb +++ b/app/controllers/admin/email_templates_controller.rb @@ -3,7 +3,7 @@ class Admin::EmailTemplatesController < Admin::AdminController def self.email_keys @email_keys ||= ["invite_forum_mailer", "invite_mailer", "invite_password_instructions", "custom_invite_mailer", "custom_invite_forum_mailer", - "new_version_mailer", "new_version_mailer_with_notes", "queued_posts_reminder", + "new_version_mailer", "new_version_mailer_with_notes", "system_messages.queued_posts_reminder", "system_messages.backup_failed", "system_messages.backup_succeeded", "system_messages.silenced_by_staff", "system_messages.bulk_invite_failed", "system_messages.bulk_invite_succeeded", "system_messages.csv_export_failed", diff --git a/spec/requests/admin/email_templates_controller_spec.rb b/spec/requests/admin/email_templates_controller_spec.rb index b37a5e65a23..150112d3541 100644 --- a/spec/requests/admin/email_templates_controller_spec.rb +++ b/spec/requests/admin/email_templates_controller_spec.rb @@ -303,4 +303,9 @@ RSpec.describe Admin::EmailTemplatesController do end + it "uses only existing email templates" do + Admin::EmailTemplatesController.email_keys.each do |key| + expect(I18n.t(key)).to_not include('translation missing') + end + end end