diff options
Diffstat (limited to 'spec/lib/gitlab/import_export/project_tree_restorer_spec.rb')
-rw-r--r-- | spec/lib/gitlab/import_export/project_tree_restorer_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb b/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb index 2e986827640..b06d4a8d8e3 100644 --- a/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb @@ -12,10 +12,15 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do @project = create(:project, :builds_disabled, :issues_disabled, name: 'project', path: 'project') allow(@project.repository).to receive(:fetch_ref).and_return(true) - expect(@project.repository).to receive(:create_branch).with('feature', 'DCBA') + allow(@project.repository.raw).to receive(:rugged_branch_exists?).and_return(false) + + expect_any_instance_of(Gitlab::Git::Repository).to receive(:create_branch).with('feature', 'DCBA') + allow_any_instance_of(Gitlab::Git::Repository).to receive(:create_branch) project_tree_restorer = described_class.new(user: @user, shared: @shared, project: @project) @restored_project_json = project_tree_restorer.restore + + end end |