move spec back into shared example an email sent from GitLab
This commit is contained in:
parent
2a438f452c
commit
048f124a08
2 changed files with 10 additions and 7 deletions
|
@ -1094,11 +1094,4 @@ describe Notify do
|
||||||
is_expected.to have_body_text /#{diff_path}/
|
is_expected.to have_body_text /#{diff_path}/
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'email has correct subject' do
|
|
||||||
it 'has correct suffix' do
|
|
||||||
stub_config_setting(email_subject_suffix: 'A Nice Suffix')
|
|
||||||
is_expected.to have_subject /\| A Nice Suffix$/
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -37,6 +37,16 @@ shared_examples 'an email sent from GitLab' do
|
||||||
reply_to = subject.header[:reply_to].addresses
|
reply_to = subject.header[:reply_to].addresses
|
||||||
expect(reply_to).to eq([gitlab_sender_reply_to])
|
expect(reply_to).to eq([gitlab_sender_reply_to])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'when custom suffix for email subject is set' do
|
||||||
|
before do
|
||||||
|
stub_config_setting(email_subject_suffix: 'A Nice Suffix')
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'ends the subject with the suffix' do
|
||||||
|
is_expected.to have_subject (/ \| A Nice Suffix$/)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples 'an email that contains a header with author username' do
|
shared_examples 'an email that contains a header with author username' do
|
||||||
|
|
Loading…
Reference in a new issue