summaryrefslogtreecommitdiff
path: root/spec/services/system_note_service_spec.rb
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2019-08-27 12:00:34 +0100
committerMayra Cabrera <mcabrera@gitlab.com>2019-08-28 16:56:02 -0500
commit057df5a3f4f828fab9c0c2de08b0e53e424b99f7 (patch)
treead5a40a26d53df99273a2e1221bc1f685c2b0bda /spec/services/system_note_service_spec.rb
parent7225162f30d0cbdefddba802f84e19d55d46da94 (diff)
downloadgitlab-ce-63262-notes-are-persisted-with-the-user-s-locale.tar.gz
Do not persist translated system notes63262-notes-are-persisted-with-the-user-s-locale
Diffstat (limited to 'spec/services/system_note_service_spec.rb')
-rw-r--r--spec/services/system_note_service_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb
index f46f9633c1c..910fe3b50b7 100644
--- a/spec/services/system_note_service_spec.rb
+++ b/spec/services/system_note_service_spec.rb
@@ -212,6 +212,13 @@ describe SystemNoteService do
expect(build_note([assignee, assignee1, assignee2], [assignee, assignee1])).to eq \
"unassigned @#{assignee2.username}"
end
+
+ it 'builds a correct phrase when the locale is different' do
+ Gitlab::I18n.with_locale('pt-BR') do
+ expect(build_note([assignee, assignee1, assignee2], [assignee3])).to eq \
+ "assigned to @#{assignee3.username} and unassigned @#{assignee.username}, @#{assignee1.username}, and @#{assignee2.username}"
+ end
+ end
end
describe '.change_milestone' do