BigW Consortium Gitlab

Commit bd3ae192 by Grzegorz Bizon

Rename MWPS in system notes and related tests

parent 01f23889
......@@ -135,7 +135,7 @@ module SystemNoteService
# Called when 'merge when build succeeds' is executed
def merge_when_build_succeeds(noteable, project, author, last_commit)
body = "Enabled an automatic merge when the build for #{last_commit.to_reference(project)} succeeds"
body = "Enabled an automatic merge when the pipeline for #{last_commit.to_reference(project)} succeeds"
create_note(noteable: noteable, project: project, author: author, note: body)
end
......
%h4
Set by #{link_to_member(@project, @merge_request.merge_user, avatar: true)}
to be merged automatically when the build succeeds.
to be merged automatically when the pipeline succeeds.
%div
%p
= succeed '.' do
......
......@@ -40,11 +40,11 @@ feature 'Merge When Build Succeeds', feature: true, js: true do
it 'activates Merge When Build Succeeds feature' do
expect(page).to have_link "Cancel Automatic Merge"
expect(page).to have_content "Set by #{user.name} to be merged automatically when the build succeeds."
expect(page).to have_content "Set by #{user.name} to be merged automatically when the pipeline succeeds."
expect(page).to have_content "The source branch will not be removed."
visit_merge_request(merge_request) # Needed to refresh the page
expect(page).to have_content /Enabled an automatic merge when the build for [0-9a-f]{8} succeeds/i
expect(page).to have_content /Enabled an automatic merge when the pipeline for [0-9a-f]{8} succeeds/i
end
end
end
......
......@@ -40,7 +40,7 @@ describe MergeRequests::MergeWhenPipelineSucceedsService do
it 'creates a system note' do
note = merge_request.notes.last
expect(note.note).to match /Enabled an automatic merge when the build for (\w+\/\w+@)?[0-9a-z]{8}/
expect(note.note).to match /Enabled an automatic merge when the pipeline for (\w+\/\w+@)?[0-9a-z]{8}/
end
end
......
......@@ -225,8 +225,8 @@ describe SystemNoteService, services: true do
it_behaves_like 'a system note'
it "posts the Merge When Build Succeeds system note" do
expect(subject.note).to match /Enabled an automatic merge when the build for (\w+\/\w+@)?[0-9a-f]{40} succeeds/
it "posts the 'merge when pipeline succeeds' system note" do
expect(subject.note).to match /Enabled an automatic merge when the pipeline for (\w+\/\w+@)?[0-9a-f]{40} succeeds/
end
end
......@@ -239,7 +239,7 @@ describe SystemNoteService, services: true do
it_behaves_like 'a system note'
it "posts the Merge When Build Succeeds system note" do
it "posts the 'merge when pipeline succeeds' system note" do
expect(subject.note).to eq "Canceled the automatic merge"
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment