summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2019-04-04 09:35:08 +0000
committerSean McGivern <sean@gitlab.com>2019-04-04 09:35:08 +0000
commite3c7374a7adcbc6d663f411e97ead4a43d84ebfc (patch)
treec3da5b5d4dcb9bea3a8ce35b5634838249b58995 /spec
parentc115ac4fa55f709187f6634b07e3d4bd067ec787 (diff)
parent473674a2c321396d8bea0cfc53eb483abfca2e1a (diff)
downloadgitlab-ce-e3c7374a7adcbc6d663f411e97ead4a43d84ebfc.tar.gz
Merge branch '55964-fix-email-encoding' into 'master'
Prevent premailer from replacing HTML entities Closes #55964 See merge request gitlab-org/gitlab-ce!26931
Diffstat (limited to 'spec')
-rw-r--r--spec/mailers/notify_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index 3c8897ed37c..5fa1369c00a 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -30,6 +30,19 @@ describe Notify do
description: 'My awesome description!')
end
+ describe 'with HTML-encoded entities' do
+ before do
+ described_class.test_email('test@test.com', 'Subject', 'Some body with &mdash;').deliver
+ end
+
+ subject { ActionMailer::Base.deliveries.last }
+
+ it 'retains 7bit encoding' do
+ expect(subject.body.ascii_only?).to eq(true)
+ expect(subject.body.encoding).to eq('7bit')
+ end
+ end
+
context 'for a project' do
shared_examples 'an assignee email' do
it 'is sent to the assignee as the author' do