diff options
author | Olivier CrĂȘte <olivier.crete@ocrete.ca> | 2018-12-13 14:15:48 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-12-13 14:15:48 +0300 |
commit | a96cd7cb2bd3cfcafc30a349bdd9289f9db055a5 (patch) | |
tree | d76a1149567ab764c31fdc7ee50a033e7f69005c /spec/support/shared_examples/notify_shared_examples.rb | |
parent | 3821813d1a5f43c1e7dc43347425198b38f1086d (diff) |
Add List-Id to notification emails
Diffstat (limited to 'spec/support/shared_examples/notify_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/notify_shared_examples.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/support/shared_examples/notify_shared_examples.rb b/spec/support/shared_examples/notify_shared_examples.rb index 66536e80db2..a38354060cf 100644 --- a/spec/support/shared_examples/notify_shared_examples.rb +++ b/spec/support/shared_examples/notify_shared_examples.rb @@ -1,5 +1,5 @@ shared_context 'gitlab email notification' do - set(:project) { create(:project, :repository) } + set(:project) { create(:project, :repository, name: 'a-known-name') } set(:recipient) { create(:user, email: 'recipient@example.com') } let(:gitlab_sender_display_name) { Gitlab.config.gitlab.email_display_name } @@ -62,9 +62,11 @@ end shared_examples 'an email with X-GitLab headers containing project details' do it 'has X-GitLab-Project headers' do aggregate_failures do + full_path_as_domain = "#{project.name}.#{project.namespace.path}" is_expected.to have_header('X-GitLab-Project', /#{project.name}/) is_expected.to have_header('X-GitLab-Project-Id', /#{project.id}/) is_expected.to have_header('X-GitLab-Project-Path', /#{project.full_path}/) + is_expected.to have_header('List-Id', "#{project.full_path} <#{project.id}.#{full_path_as_domain}.#{Gitlab.config.gitlab.host}>") end end end |