diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2019-06-03 11:24:59 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-06-03 11:24:59 +0000 |
commit | a7fd826a539c39b6c3a5cf3a6ed3a49c437f865e (patch) | |
tree | 78cade8f550bdf2930527269f48e02d6766342c2 /spec/presenters | |
parent | b2d7b7adc029f07c3e84bc7f84d2cba31f6cf31a (diff) | |
parent | 84e550fad9c95dd19bb1739fc48ef6694c9f737d (diff) | |
download | gitlab-ce-a7fd826a539c39b6c3a5cf3a6ed3a49c437f865e.tar.gz |
Merge branch 'abstract-auto-merge' into 'master'
Refactor and abstract Auto Merge Processes
See merge request gitlab-org/gitlab-ce!28595
Diffstat (limited to 'spec/presenters')
-rw-r--r-- | spec/presenters/merge_request_presenter_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/presenters/merge_request_presenter_spec.rb b/spec/presenters/merge_request_presenter_spec.rb index 0e1aed42cc5..6408b0bd748 100644 --- a/spec/presenters/merge_request_presenter_spec.rb +++ b/spec/presenters/merge_request_presenter_spec.rb @@ -207,25 +207,25 @@ describe MergeRequestPresenter do end end - describe '#cancel_merge_when_pipeline_succeeds_path' do + describe '#cancel_auto_merge_path' do subject do described_class.new(resource, current_user: user) - .cancel_merge_when_pipeline_succeeds_path + .cancel_auto_merge_path end context 'when can cancel mwps' do it 'returns path' do - allow(resource).to receive(:can_cancel_merge_when_pipeline_succeeds?) + allow(resource).to receive(:can_cancel_auto_merge?) .with(user) .and_return(true) - is_expected.to eq("/#{resource.project.full_path}/merge_requests/#{resource.iid}/cancel_merge_when_pipeline_succeeds") + is_expected.to eq("/#{resource.project.full_path}/merge_requests/#{resource.iid}/cancel_auto_merge") end end context 'when cannot cancel mwps' do it 'returns nil' do - allow(resource).to receive(:can_cancel_merge_when_pipeline_succeeds?) + allow(resource).to receive(:can_cancel_auto_merge?) .with(user) .and_return(false) |