diff options
author | Daniel Wyatt <daniel.wyatt@ribose.com> | 2019-04-09 12:10:15 +0300 |
---|---|---|
committer | Daniel Wyatt <daniel.wyatt@ribose.com> | 2019-04-09 14:08:59 +0300 |
commit | cf804218c95ce79d56bc6470135e14a505b3f9ab (patch) | |
tree | c4033fdf8cb1e17b5c14749ba9fb5d47d2dd5646 /spec/lib/gitlab/legacy_github_import | |
parent | 26fdcf7b6103aa47943271a5f6358d9779d5a9b3 (diff) |
Add test for github project import to user namespace.
Diffstat (limited to 'spec/lib/gitlab/legacy_github_import')
-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 |