summaryrefslogtreecommitdiff
path: root/spec/helpers/projects_helper_spec.rb
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2016-06-14 12:27:33 -0400
committerAlejandro Rodríguez <alejorro70@gmail.com>2016-06-14 12:32:51 -0400
commit98c5e6295b201eeaa760d104f9b43e237f1dbd49 (patch)
tree9769f7903dabe8b5f8745ced9eb9f1bcf6d7fee4 /spec/helpers/projects_helper_spec.rb
parentc6cc7680e7da89c145b7e2075266791a3f594eec (diff)
downloadgitlab-ce-shards-test.tar.gz
Refactor repository paths handling to allow multiple git mount pointsshards-test
Diffstat (limited to 'spec/helpers/projects_helper_spec.rb')
-rw-r--r--spec/helpers/projects_helper_spec.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb
index 09e0bbfd00b..604204cca0a 100644
--- a/spec/helpers/projects_helper_spec.rb
+++ b/spec/helpers/projects_helper_spec.rb
@@ -123,11 +123,17 @@ describe ProjectsHelper do
end
describe '#sanitized_import_error' do
+ let(:project) { create(:project) }
+
+ before do
+ allow(project).to receive(:repository_storage_path).and_return('/base/repo/path')
+ end
+
it 'removes the repo path' do
- repo = File.join(Gitlab.config.gitlab_shell.repos_path, '/namespace/test.git')
+ repo = '/base/repo/path/namespace/test.git'
import_error = "Could not clone #{repo}\n"
- expect(sanitize_repo_path(import_error)).to eq('Could not clone [REPOS PATH]/namespace/test.git')
+ expect(sanitize_repo_path(project, import_error)).to eq('Could not clone [REPOS PATH]/namespace/test.git')
end
end
end