| ... | @@ -99,17 +99,11 @@ describe Notify do |
... | @@ -99,17 +99,11 @@ describe Notify do |
|
|
end
|
|
end
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
context 'when enabled email_author_in_body' do
|
|
it 'contains a link to issue author' do
|
|
|
before do
|
|
|
|
|
stub_application_setting(email_author_in_body: true)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'contains a link to note author' do
|
|
|
|
|
is_expected.to have_body_text(issue.author_name)
|
|
is_expected.to have_body_text(issue.author_name)
|
|
|
is_expected.to have_body_text 'created an issue:'
|
|
is_expected.to have_body_text 'created an issue:'
|
|
|
end
|
|
end
|
|
|
end
|
|
end
|
|
|
end
|
|
|
|
|
|
|
|
|
|
describe 'that are reassigned' do
|
|
describe 'that are reassigned' do
|
|
|
let(:previous_assignee) { create(:user, name: 'Previous Assignee') }
|
|
let(:previous_assignee) { create(:user, name: 'Previous Assignee') }
|
| ... | @@ -314,17 +308,11 @@ describe Notify do |
... | @@ -314,17 +308,11 @@ describe Notify do |
|
|
end
|
|
end
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
context 'when enabled email_author_in_body' do
|
|
it 'contains a link to merge request author' do
|
|
|
before do
|
|
|
|
|
stub_application_setting(email_author_in_body: true)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'contains a link to note author' do
|
|
|
|
|
is_expected.to have_body_text merge_request.author_name
|
|
is_expected.to have_body_text merge_request.author_name
|
|
|
is_expected.to have_body_text 'created a merge request:'
|
|
is_expected.to have_body_text 'created a merge request:'
|
|
|
end
|
|
end
|
|
|
end
|
|
end
|
|
|
end
|
|
|
|
|
|
|
|
|
|
describe 'that are reassigned' do
|
|
describe 'that are reassigned' do
|
|
|
let(:previous_assignee) { create(:user, name: 'Previous Assignee') }
|
|
let(:previous_assignee) { create(:user, name: 'Previous Assignee') }
|
| ... | @@ -907,7 +895,9 @@ describe Notify do |
... | @@ -907,7 +895,9 @@ describe Notify do |
|
|
end
|
|
end
|
|
|
|
|
|
|
|
it 'contains an introduction' do
|
|
it 'contains an introduction' do
|
|
|
is_expected.to have_body_text 'started a new discussion'
|
|
issuable_url = "project_#{note.noteable_type.underscore}_url"
|
|
|
|
|
|
|
|
is_expected.to have_body_text "started a new <a href=\"#{public_send(issuable_url, project, note.noteable, anchor: "note_#{note.id}")}\">discussion</a>"
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
context 'when a comment on an existing discussion' do
|
|
context 'when a comment on an existing discussion' do
|
| ... | |
... | |
| ... | | ... | |