fix specs

This commit is contained in:
James Lopez 2017-11-07 15:40:13 +01:00
parent c93dab478f
commit 9a0acc98aa
2 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ module Gitlab
end
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
def branch_exists?(branch_name)

View File

@ -31,9 +31,9 @@ describe Gitlab::ImportExport::MergeRequestParser do
end
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(Gitlab::ImportExport::MergeRequestParser).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(: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(Gitlab::GitalyClient).to receive(:migrate).and_call_original
allow(Gitlab::GitalyClient).to receive(:migrate).with(:fetch_ref).and_return([nil, 0])