Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-05-04 07:32:49 +0300
committerStan Hu <stanhu@gmail.com>2016-05-05 00:06:07 +0300
commit75523d1df91cc871847a00cad4e5e1d44278a647 (patch)
tree47479fc70996c167438f89795d3d7353c66782e4 /spec/helpers
parent8be1118aa528dff6787fdab7fbde7261a012c418 (diff)
Sanitize repo paths in new project error message
Closes #17243
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/projects_helper_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb
index 62389188d2c..29bcb8c5892 100644
--- a/spec/helpers/projects_helper_spec.rb
+++ b/spec/helpers/projects_helper_spec.rb
@@ -131,4 +131,13 @@ describe ProjectsHelper do
end
end
end
+
+ describe '#sanitized_import_error' do
+ it 'removes the repo path' do
+ repo = File.join(Gitlab.config.gitlab_shell.repos_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')
+ end
+ end
end