Add test for github project import to user namespace.

This commit is contained in:
Daniel Wyatt 2019-04-09 05:10:15 -04:00
parent 26fdcf7b61
commit cf804218c9
1 changed files with 12 additions and 0 deletions

View File

@ -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