diff options
author | Wei-Meng Lee <wlee@gitlab.com> | 2019-02-15 20:56:13 +0300 |
---|---|---|
committer | Wei-Meng Lee <wlee@gitlab.com> | 2019-05-31 15:49:27 +0300 |
commit | 1a402d888c05196212d1ba671368837e85246c9c (patch) | |
tree | fa4c4da1cc8eaf9268421448f7dd62a8b17ffffa /spec/mailers/notify_spec.rb | |
parent | 6d73ce696c02bc949b9e3e71b8c14554e43ab340 (diff) |
Send notifications to group-specific email address
- Select notification email by walking up group/subgroup path
- Add settings UI to set group email notification address
- Add tests
Diffstat (limited to 'spec/mailers/notify_spec.rb')
-rw-r--r-- | spec/mailers/notify_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index 8f348b1b053..67c1aa69db4 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -45,6 +45,10 @@ describe Notify do context 'for a project' do shared_examples 'an assignee email' do + let(:test_recipient) { assignee } + + it_behaves_like 'an email sent to a user' + it 'is sent to the assignee as the author' do sender = subject.header[:from].addrs.first @@ -618,8 +622,10 @@ describe Notify do end describe 'project was moved' do + let(:test_recipient) { user } subject { described_class.project_was_moved_email(project.id, user.id, "gitlab/gitlab") } + it_behaves_like 'an email sent to a user' it_behaves_like 'an email sent from GitLab' it_behaves_like 'it should not have Gmail Actions links' it_behaves_like "a user cannot unsubscribe through footer link" @@ -1083,8 +1089,6 @@ describe Notify do end context 'for a group' do - set(:group) { create(:group) } - describe 'group access requested' do let(:group) { create(:group, :public, :access_requestable) } let(:group_member) do |