diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-16 15:07:43 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-16 15:07:43 +0300 |
commit | d10a462fedbd7794a83abdba9b4526600f71de5b (patch) | |
tree | 4dbd21cb89013d9e07b05bac5101cd13585a8be5 /spec/lib/gitlab/import_export/merge_request_parser_spec.rb | |
parent | 13867d66e92c2fd8962a126db4fbdc32891343c9 (diff) |
Add latest changes from gitlab-org/gitlab@masterogolowinski-master-patch-80898
Diffstat (limited to 'spec/lib/gitlab/import_export/merge_request_parser_spec.rb')
-rw-r--r-- | spec/lib/gitlab/import_export/merge_request_parser_spec.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/lib/gitlab/import_export/merge_request_parser_spec.rb b/spec/lib/gitlab/import_export/merge_request_parser_spec.rb index e7f039d7a6f..c437efede4c 100644 --- a/spec/lib/gitlab/import_export/merge_request_parser_spec.rb +++ b/spec/lib/gitlab/import_export/merge_request_parser_spec.rb @@ -35,9 +35,11 @@ describe Gitlab::ImportExport::MergeRequestParser do end it 'parses a MR that has no source branch' do - allow_any_instance_of(described_class).to receive(:branch_exists?).and_call_original - allow_any_instance_of(described_class).to receive(:branch_exists?).with(merge_request.source_branch).and_return(false) - allow_any_instance_of(described_class).to receive(:fork_merge_request?).and_return(true) + allow_next_instance_of(described_class) do |instance| + allow(instance).to receive(:branch_exists?).and_call_original + allow(instance).to receive(:branch_exists?).with(merge_request.source_branch).and_return(false) + allow(instance).to receive(:fork_merge_request?).and_return(true) + end allow(Gitlab::GitalyClient).to receive(:migrate).and_call_original allow(Gitlab::GitalyClient).to receive(:migrate).with(:fetch_ref).and_return([nil, 0]) |