summaryrefslogtreecommitdiff
path: root/spec/factories/projects.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/projects.rb')
-rw-r--r--spec/factories/projects.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb
index 7d7738a30c8..0e8810b73a1 100644
--- a/spec/factories/projects.rb
+++ b/spec/factories/projects.rb
@@ -25,7 +25,9 @@ FactoryBot.define do
issues_access_level ProjectFeature::ENABLED
merge_requests_access_level ProjectFeature::ENABLED
repository_access_level ProjectFeature::ENABLED
- pages_access_level ProjectFeature::ENABLED
+ pages_access_level do
+ visibility_level == Gitlab::VisibilityLevel::PUBLIC ? ProjectFeature::ENABLED : ProjectFeature::PRIVATE
+ end
# we can't assign the delegated `#ci_cd_settings` attributes directly, as the
# `#ci_cd_settings` relation needs to be created first