fix specs
This commit is contained in:
parent
c93dab478f
commit
9a0acc98aa
|
@ -26,7 +26,7 @@ module Gitlab
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_ref
|
def fetch_ref
|
||||||
@project.repository.fetch_ref(@project.repository.path, source_ref: @diff_head_sha, target_ref: @merge_request.source_branch)
|
@project.repository.fetch_ref(@project.repository, source_ref: @diff_head_sha, target_ref: @merge_request.source_branch)
|
||||||
end
|
end
|
||||||
|
|
||||||
def branch_exists?(branch_name)
|
def branch_exists?(branch_name)
|
||||||
|
|
|
@ -31,9 +31,9 @@ describe Gitlab::ImportExport::MergeRequestParser do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'parses a MR that has no source branch' do
|
it 'parses a MR that has no source branch' do
|
||||||
allow_any_instance_of(Gitlab::ImportExport::MergeRequestParser).to receive(:branch_exists?).and_call_original
|
allow_any_instance_of(described_class).to receive(:branch_exists?).and_call_original
|
||||||
allow_any_instance_of(Gitlab::ImportExport::MergeRequestParser).to receive(:branch_exists?).with(merge_request.source_branch).and_return(false)
|
allow_any_instance_of(described_class).to receive(:branch_exists?).with(merge_request.source_branch).and_return(false)
|
||||||
allow_any_instance_of(Gitlab::ImportExport::MergeRequestParser).to receive(:fork_merge_request?).and_return(true)
|
allow_any_instance_of(described_class).to receive(:fork_merge_request?).and_return(true)
|
||||||
allow(Gitlab::GitalyClient).to receive(:migrate).and_call_original
|
allow(Gitlab::GitalyClient).to receive(:migrate).and_call_original
|
||||||
allow(Gitlab::GitalyClient).to receive(:migrate).with(:fetch_ref).and_return([nil, 0])
|
allow(Gitlab::GitalyClient).to receive(:migrate).with(:fetch_ref).and_return([nil, 0])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue