diff options
author | Stan Hu <stanhu@gmail.com> | 2018-12-05 16:43:29 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-01-28 13:06:27 -0800 |
commit | eafccaad7346d6e1f8d13024bb5295bc683ab046 (patch) | |
tree | 433d6ed6404f8c2edd77a03a6254c2884300974f /spec/helpers | |
parent | c2b3f64cb44114e69ddeeb453412ad4dd762baf9 (diff) | |
download | gitlab-ce-eafccaad7346d6e1f8d13024bb5295bc683ab046.tar.gz |
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.rb | 4 |
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 |