diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-30 14:45:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-30 14:46:11 +0300 |
commit | c6c26f3b730d4bbc567aee33b4c6fd621517055e (patch) | |
tree | 1a7588616ca65d5927f20d92ffc2ed2aa6d7d50e /spec/services/projects | |
parent | a262d7269b9dc9060f3f5b3de0976d8058c1b580 (diff) |
Add latest changes from gitlab-org/security/gitlab@14-0-stable-ee
Diffstat (limited to 'spec/services/projects')
-rw-r--r-- | spec/services/projects/fork_service_spec.rb | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/spec/services/projects/fork_service_spec.rb b/spec/services/projects/fork_service_spec.rb index 276656656ec..d710e4a777f 100644 --- a/spec/services/projects/fork_service_spec.rb +++ b/spec/services/projects/fork_service_spec.rb @@ -184,14 +184,6 @@ RSpec.describe Projects::ForkService do end end - context 'GitLab CI is enabled' do - it "forks and enables CI for fork" do - @from_project.enable_ci - @to_project = fork_project(@from_project, @to_user, using_service: true) - expect(@to_project.builds_enabled?).to be_truthy - end - end - context "CI/CD settings" do let(:to_project) { fork_project(@from_project, @to_user, using_service: true) } @@ -366,6 +358,19 @@ RSpec.describe Projects::ForkService do expect(forked_project.visibility_level).to eq(Gitlab::VisibilityLevel::PRIVATE) end + + it 'copies project features visibility settings to the fork', :aggregate_failures do + attrs = ProjectFeature::FEATURES.to_h do |f| + ["#{f}_access_level", ProjectFeature::PRIVATE] + end + + public_project.project_feature.update!(attrs) + + user = create(:user, developer_projects: [public_project]) + forked_project = described_class.new(public_project, user).execute + + expect(forked_project.project_feature.slice(attrs.keys)).to eq(attrs) + end end end |