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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Shushlin <vshushlin@gitlab.com>2019-07-17 22:52:03 +0300
committerStan Hu <stanhu@gmail.com>2019-07-17 22:52:03 +0300
commit0e62440722b14db14f54498d1fb3c389cbfe367f (patch)
tree376d2c53a90bdf50f664946a377e919afc0786ce /spec/factories/projects.rb
parent78f461bbab6e0ee51472dba63f705bfed061f869 (diff)
Fix factory default for pages_access_level
Pages access level currently depends on project visibilty which is ignored by factory, this commit fixes that
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