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>2018-12-06 03:43:29 +0300
committerStan Hu <stanhu@gmail.com>2019-01-29 00:06:27 +0300
commiteafccaad7346d6e1f8d13024bb5295bc683ab046 (patch)
tree433d6ed6404f8c2edd77a03a6254c2884300974f /spec/helpers
parentc2b3f64cb44114e69ddeeb453412ad4dd762baf9 (diff)
Fix Bitbucket Server import not allowing personal projects
Bitbucket Server places personal projects in a namespace called `~username`. This change allows those projects and also strips them from the GitLab namespace. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53419
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/import_helper_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/helpers/import_helper_spec.rb b/spec/helpers/import_helper_spec.rb
index cb0ea4e26ba..af4931e3370 100644
--- a/spec/helpers/import_helper_spec.rb
+++ b/spec/helpers/import_helper_spec.rb
@@ -2,6 +2,10 @@ require 'rails_helper'
describe ImportHelper do
describe '#sanitize_project_name' do
+ it 'removes leading tildes' do
+ expect(helper.sanitize_project_name('~~root')).to eq('root')
+ end
+
it 'removes whitespace' do
expect(helper.sanitize_project_name('my test repo')).to eq('my-test-repo')
end