diff options
author | James Lopez <james@jameslopez.es> | 2017-08-22 09:59:01 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-08-22 09:59:01 +0300 |
commit | ac53067b6467c0cec9e224b3e0aec0efdab84b00 (patch) | |
tree | 8a34a9b849b0a22380debb5901d2a276b3c4b205 /spec | |
parent | 0fe2029040d2c3fcd3e19322591a568f14794ec9 (diff) |
fix specs
Diffstat (limited to 'spec')
-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 |