diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-21 10:55:54 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-21 11:04:36 +0100 |
commit | bd3ae192bb62d522912281b5943073f6ad444fe4 (patch) | |
tree | b2fbee25011f0c63071718d38f6612690c88ac57 | |
parent | 01f238893aaf8f5aa24eec7e33edc479d4e1315d (diff) | |
download | gitlab-ce-bd3ae192bb62d522912281b5943073f6ad444fe4.tar.gz |
Rename MWPS in system notes and related tests
5 files changed, 8 insertions, 8 deletions
diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb index 1ce66d50368..925e4938784 100644 --- a/app/services/system_note_service.rb +++ b/app/services/system_note_service.rb @@ -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 diff --git a/app/views/projects/merge_requests/widget/open/_merge_when_build_succeeds.html.haml b/app/views/projects/merge_requests/widget/open/_merge_when_build_succeeds.html.haml index 2b6b5e05e86..cea3e28ceb3 100644 --- a/app/views/projects/merge_requests/widget/open/_merge_when_build_succeeds.html.haml +++ b/app/views/projects/merge_requests/widget/open/_merge_when_build_succeeds.html.haml @@ -1,6 +1,6 @@ %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 diff --git a/spec/features/merge_requests/merge_when_build_succeeds_spec.rb b/spec/features/merge_requests/merge_when_build_succeeds_spec.rb index 8eceaad2457..a710ca66f70 100644 --- a/spec/features/merge_requests/merge_when_build_succeeds_spec.rb +++ b/spec/features/merge_requests/merge_when_build_succeeds_spec.rb @@ -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 diff --git a/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb b/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb index 793806bd69a..3b7c9204a35 100644 --- a/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb +++ b/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb @@ -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 diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb index 56d39e9a005..7f0da4bf03c 100644 --- a/spec/services/system_note_service_spec.rb +++ b/spec/services/system_note_service_spec.rb @@ -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 |