diff options
author | Sean McGivern <sean@gitlab.com> | 2016-05-06 15:16:53 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2016-05-11 11:16:01 +0300 |
commit | 5f27e26bb4d073c04fd6d3f4116fc1a122db8c00 (patch) | |
tree | a0fea0df79f8e8fae17eb2d5bb1caed099d9b490 /spec/lib/gitlab/email | |
parent | 48c80fdf43e44ae003753c81a832fc2c0eafdb5d (diff) |
Only generate repository push email once
The repository push email can be very expensive to generate, especially
with syntax-highlighted diffs. Instead of generating the email for each
recipient, generate one email object and reset the Message-Id and To
headers for each recipient. (Cloning would also be expensive in the case
of large emails, although probably not as bad as generating from
scratch.)
Diffstat (limited to 'spec/lib/gitlab/email')
-rw-r--r-- | spec/lib/gitlab/email/message/repository_push_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/lib/gitlab/email/message/repository_push_spec.rb b/spec/lib/gitlab/email/message/repository_push_spec.rb index b2d7a799810..7d6cce6daec 100644 --- a/spec/lib/gitlab/email/message/repository_push_spec.rb +++ b/spec/lib/gitlab/email/message/repository_push_spec.rb @@ -8,7 +8,7 @@ describe Gitlab::Email::Message::RepositoryPush do let!(:author) { create(:author, name: 'Author') } let(:message) do - described_class.new(Notify, project.id, 'recipient@example.com', opts) + described_class.new(Notify, project.id, opts) end context 'new commits have been pushed to repository' do |