diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-05 15:11:48 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-05 15:11:48 +0000 |
commit | 81a37f05815a4c731a2d2c93302ddc554444b637 (patch) | |
tree | 447d3a8890961e63efc47280ac15f06c9c0567ff /spec/policies | |
parent | f7406657b9ed27af2970a88ce4f73c35b162dfb8 (diff) | |
download | gitlab-ce-81a37f05815a4c731a2d2c93302ddc554444b637.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/policies')
-rw-r--r-- | spec/policies/project_policy_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/policies/project_policy_spec.rb b/spec/policies/project_policy_spec.rb index f36b0a62aa3..67d7e49f8db 100644 --- a/spec/policies/project_policy_spec.rb +++ b/spec/policies/project_policy_spec.rb @@ -955,6 +955,28 @@ RSpec.describe ProjectPolicy do end end + context 'infrastructure google cloud feature' do + %w(guest reporter developer).each do |role| + context role do + let(:current_user) { send(role) } + + it 'disallows managing google cloud' do + expect_disallowed(:admin_project_google_cloud) + end + end + end + + %w(maintainer owner).each do |role| + context role do + let(:current_user) { send(role) } + + it 'allows managing google cloud' do + expect_allowed(:admin_project_google_cloud) + end + end + end + end + describe 'design permissions' do include DesignManagementTestHelpers |