about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2018-02-17 22:27:51 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-02-17 14:27:51 +0100
commita7c50c7abab98b3db0b89e3b2fe78abe0dc9789c (patch)
treee622a71d887d7ab95b77c0784369fa69e02b3e85
parentc770b503c0e75015f8ba1ca90755b19326b64c3d (diff)
Limit the languages used for notification mailer test (#6487)
Some available languages lack translations for notification mails. Now it
tests for two languages which is certain to have required translations:
German and English.

German is the language the current project owner, Eugen Rochko speaks, and
providing English translations for new messages is de facto mandatory.
-rw-r--r--spec/mailers/notification_mailer_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/mailers/notification_mailer_spec.rb b/spec/mailers/notification_mailer_spec.rb
index 811435606..1be01e8ba 100644
--- a/spec/mailers/notification_mailer_spec.rb
+++ b/spec/mailers/notification_mailer_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe NotificationMailer, type: :mailer do
 
   shared_examples 'localized subject' do |*args, **kwrest|
     it 'renders subject localized for the locale of the receiver' do
-      locale = I18n.available_locales.sample
+      locale = %i(de en).sample
       receiver.update!(locale: locale)
       expect(mail.subject).to eq I18n.t(*args, kwrest.merge(locale: locale))
     end