context'closing some issues and mentioning, but not closing, others'do
let(:merge_request_description){"Description\n\ncloses #{issue_1.to_reference}\n\n refers to #{issue_2.to_reference}"}
context'closing some issues in title and mentioning, but not closing, others'do
let(:merge_request_title){"closes #{issue_1.to_reference}\n\n refers to #{issue_2.to_reference}"}
it'does not display closing issue message'do
expect(page).tohave_content("Accepting this merge request will close issue #{issue_1.to_reference}. Issue #{issue_2.to_reference} is mentioned but will not be closed.")
end
end
context'closing issues using title but not mentioning any other issue'do
expect(page).tohave_content("Accepting this merge request will close issues #{issue_1.to_reference} and #{issue_2.to_reference}")
end
end
context'mentioning issues using title but not closing them'do
let(:merge_request_title){"Refers to #{issue_1.to_reference} and #{issue_2.to_reference}"}
it'does not display closing issue message'do
expect(page).tohave_content("Issues #{issue_1.to_reference} and #{issue_2.to_reference} are mentioned but will not be closed.")
end
end
context'closing some issues using title and mentioning, but not closing, others'do
let(:merge_request_title){"closes #{issue_1.to_reference}\n\n refers to #{issue_2.to_reference}"}
it'does not display closing issue message'do
expect(page).tohave_content("Accepting this merge request will close issue #{issue_1.to_reference}. Issue #{issue_2.to_reference} is mentioned but will not be closed.")