diff options
author | Vladimir Shushlin <vshushlin@gitlab.com> | 2019-07-17 22:52:03 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-07-17 22:52:03 +0300 |
commit | 0e62440722b14db14f54498d1fb3c389cbfe367f (patch) | |
tree | 376d2c53a90bdf50f664946a377e919afc0786ce /spec/factories | |
parent | 78f461bbab6e0ee51472dba63f705bfed061f869 (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')
-rw-r--r-- | spec/factories/projects.rb | 4 |
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 |