Welcome to mirror list, hosted at ThFree Co, Russian Federation.

project_features_shared_context.rb « shared_contexts « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 40d9cb29c14d149c1eb75d276bff41b5c6086dc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# frozen_string_literal: true

RSpec.shared_context 'repository disabled via project features' do
  before do
    project.project_feature.update_columns(
      # Disable merge_requests and builds as well, since merge_requests and
      # builds cannot have higher visibility than repository.
      merge_requests_access_level: ProjectFeature::DISABLED,
      builds_access_level: ProjectFeature::DISABLED,
      repository_access_level: ProjectFeature::DISABLED)
  end
end

RSpec.shared_context 'registry disabled via project features' do
  before do
    project.project_feature.update_columns(
      container_registry_access_level: ProjectFeature::DISABLED
    )
  end
end

RSpec.shared_context 'registry set to private via project features' do
  before do
    project.project_feature.update_columns(
      container_registry_access_level: ProjectFeature::PRIVATE
    )
  end
end