summaryrefslogtreecommitdiff
path: root/spec/mailers/shared/notify.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/mailers/shared/notify.rb')
-rw-r--r--spec/mailers/shared/notify.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/mailers/shared/notify.rb b/spec/mailers/shared/notify.rb
index 93de5850ba2..5c9851f14c7 100644
--- a/spec/mailers/shared/notify.rb
+++ b/spec/mailers/shared/notify.rb
@@ -169,10 +169,19 @@ shared_examples 'it should show Gmail Actions View Commit link' do
end
shared_examples 'an unsubscribeable thread' do
+ it 'has a List-Unsubscribe header in the correct format' do
+ is_expected.to have_header 'List-Unsubscribe', /unsubscribe/
+ is_expected.to have_header 'List-Unsubscribe', /^<.+>$/
+ end
+
it { is_expected.to have_body_text /unsubscribe/ }
end
shared_examples 'a user cannot unsubscribe through footer link' do
+ it 'does not have a List-Unsubscribe header' do
+ is_expected.not_to have_header 'List-Unsubscribe', /unsubscribe/
+ end
+
it { is_expected.not_to have_body_text /unsubscribe/ }
end