diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-02-16 09:33:32 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-02-16 09:33:32 +0000 |
commit | 93ae3063ad0455a0bd6b9994f718d20357a31e28 (patch) | |
tree | 75321fd1299c68dc1499f6a881b36071d204ff67 /spec/lib | |
parent | 8b955e4eb6eb92138cbc6849dfc5dc8bece5c2ae (diff) | |
parent | a89e9736266cbf9ccde3a49eccd8ab04f72bf38f (diff) | |
download | gitlab-ce-93ae3063ad0455a0bd6b9994f718d20357a31e28.tar.gz |
Merge branch 'add-auto-submited-header' into 'master'
Set `Auto-Submitted: auto-generated` header to emails
Closes #20305
See merge request !9163
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/additional_email_headers_interceptor_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/lib/additional_email_headers_interceptor_spec.rb b/spec/lib/additional_email_headers_interceptor_spec.rb new file mode 100644 index 00000000000..580450eef1e --- /dev/null +++ b/spec/lib/additional_email_headers_interceptor_spec.rb @@ -0,0 +1,12 @@ +require 'spec_helper' + +describe AdditionalEmailHeadersInterceptor do + it 'adds Auto-Submitted header' do + mail = ActionMailer::Base.mail(to: 'test@mail.com', from: 'info@mail.com', body: 'hello').deliver + + expect(mail.header['To'].value).to eq('test@mail.com') + expect(mail.header['From'].value).to eq('info@mail.com') + expect(mail.header['Auto-Submitted'].value).to eq('auto-generated') + expect(mail.header['X-Auto-Response-Suppress'].value).to eq('All') + end +end |