diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-08 21:10:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-08 21:10:47 +0300 |
commit | 03a8aa2ca6a7d7aced2fde7815c8ef85d681db60 (patch) | |
tree | 915b00839e8f0ae30f1c6756880f3ed4339d74c4 /spec/mailers/notify_spec.rb | |
parent | f8c7f38d02ebf964cbf40d9445f0f9f843710701 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/mailers/notify_spec.rb')
-rw-r--r-- | spec/mailers/notify_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index 8beb54bca4d..1f53c472c5c 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -167,6 +167,17 @@ RSpec.describe Notify do is_expected.to have_header('X-GitLab-NotificationReason', NotificationReason::ASSIGNED) end end + + context 'when sent with a non default locale' do + let(:email_obj) { create(:email, :confirmed, user_id: recipient.id, email: '123@abc') } + let(:recipient) { create(:user, preferred_language: :zh_CN) } + + it 'is translated into zh_CN' do + recipient.notification_email = email_obj.email + recipient.save! + is_expected.to have_body_text '指派人从 <strong>Previous Assignee</strong> 更改为 <strong>John Doe</strong>' + end + end end describe 'that have been relabeled' do |