diff options
author | Daniel Wyatt <daniel.wyatt@ribose.com> | 2019-04-09 05:10:15 -0400 |
---|---|---|
committer | Daniel Wyatt <daniel.wyatt@ribose.com> | 2019-04-09 07:08:59 -0400 |
commit | cf804218c95ce79d56bc6470135e14a505b3f9ab (patch) | |
tree | c4033fdf8cb1e17b5c14749ba9fb5d47d2dd5646 | |
parent | 26fdcf7b6103aa47943271a5f6358d9779d5a9b3 (diff) | |
download | gitlab-ce-cf804218c95ce79d56bc6470135e14a505b3f9ab.tar.gz |
Add test for github project import to user namespace.
-rw-r--r-- | spec/lib/gitlab/legacy_github_import/project_creator_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/lib/gitlab/legacy_github_import/project_creator_spec.rb b/spec/lib/gitlab/legacy_github_import/project_creator_spec.rb index 8c56622e0ba..3aba744458f 100644 --- a/spec/lib/gitlab/legacy_github_import/project_creator_spec.rb +++ b/spec/lib/gitlab/legacy_github_import/project_creator_spec.rb @@ -54,6 +54,18 @@ describe Gitlab::LegacyGithubImport::ProjectCreator do expect(project.visibility_level).to eq(namespace.visibility_level) end + + context 'when importing into a user namespace' do + subject(:service) { described_class.new(repo, repo.name, user.namespace, user, github_access_token: 'asdffg') } + + it 'sets project visibility to user namespace visibility level' do + repo.private = false + + project = service.execute + + expect(project.visibility_level).to eq(user.namespace.visibility_level) + end + end end context 'when visibility level is restricted' do |