From 9a0acc98aafaa315317b799c6a2a0a2fe5ded52e Mon Sep 17 00:00:00 2001 From: James Lopez Date: Tue, 7 Nov 2017 15:40:13 +0100 Subject: fix specs --- lib/gitlab/import_export/merge_request_parser.rb | 2 +- spec/lib/gitlab/import_export/merge_request_parser_spec.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/gitlab/import_export/merge_request_parser.rb b/lib/gitlab/import_export/merge_request_parser.rb index 3e842cd2919..61db4bd9ccc 100644 --- a/lib/gitlab/import_export/merge_request_parser.rb +++ b/lib/gitlab/import_export/merge_request_parser.rb @@ -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) 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 db357f3995c..b793636c4d6 100644 --- a/spec/lib/gitlab/import_export/merge_request_parser_spec.rb +++ b/spec/lib/gitlab/import_export/merge_request_parser_spec.rb @@ -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]) -- cgit v1.2.1