diff options
Diffstat (limited to 'spec/policies')
-rw-r--r-- | spec/policies/group_policy_spec.rb | 18 | ||||
-rw-r--r-- | spec/policies/project_policy_spec.rb | 4 |
2 files changed, 18 insertions, 4 deletions
diff --git a/spec/policies/group_policy_spec.rb b/spec/policies/group_policy_spec.rb index b186a78e44a..17dc3bb4f48 100644 --- a/spec/policies/group_policy_spec.rb +++ b/spec/policies/group_policy_spec.rb @@ -11,10 +11,11 @@ describe GroupPolicy do let(:reporter_permissions) { [:admin_label] } + let(:developer_permissions) { [:admin_milestones] } + let(:master_permissions) do [ - :create_projects, - :admin_milestones + :create_projects ] end @@ -52,6 +53,7 @@ describe GroupPolicy do it do expect_allowed(:read_group) expect_disallowed(*reporter_permissions) + expect_disallowed(*developer_permissions) expect_disallowed(*master_permissions) expect_disallowed(*owner_permissions) end @@ -63,6 +65,7 @@ describe GroupPolicy do it do expect_allowed(:read_group) expect_disallowed(*reporter_permissions) + expect_disallowed(*developer_permissions) expect_disallowed(*master_permissions) expect_disallowed(*owner_permissions) end @@ -74,6 +77,7 @@ describe GroupPolicy do it do expect_allowed(:read_group) expect_allowed(*reporter_permissions) + expect_disallowed(*developer_permissions) expect_disallowed(*master_permissions) expect_disallowed(*owner_permissions) end @@ -85,6 +89,7 @@ describe GroupPolicy do it do expect_allowed(:read_group) expect_allowed(*reporter_permissions) + expect_allowed(*developer_permissions) expect_disallowed(*master_permissions) expect_disallowed(*owner_permissions) end @@ -96,6 +101,7 @@ describe GroupPolicy do it do expect_allowed(:read_group) expect_allowed(*reporter_permissions) + expect_allowed(*developer_permissions) expect_allowed(*master_permissions) expect_disallowed(*owner_permissions) end @@ -109,6 +115,7 @@ describe GroupPolicy do expect_allowed(:read_group) expect_allowed(*reporter_permissions) + expect_allowed(*developer_permissions) expect_allowed(*master_permissions) expect_allowed(*owner_permissions) end @@ -122,6 +129,7 @@ describe GroupPolicy do expect_allowed(:read_group) expect_allowed(*reporter_permissions) + expect_allowed(*developer_permissions) expect_allowed(*master_permissions) expect_allowed(*owner_permissions) end @@ -180,6 +188,7 @@ describe GroupPolicy do it do expect_disallowed(:read_group) expect_disallowed(*reporter_permissions) + expect_disallowed(*developer_permissions) expect_disallowed(*master_permissions) expect_disallowed(*owner_permissions) end @@ -191,6 +200,7 @@ describe GroupPolicy do it do expect_allowed(:read_group) expect_disallowed(*reporter_permissions) + expect_disallowed(*developer_permissions) expect_disallowed(*master_permissions) expect_disallowed(*owner_permissions) end @@ -202,6 +212,7 @@ describe GroupPolicy do it do expect_allowed(:read_group) expect_allowed(*reporter_permissions) + expect_disallowed(*developer_permissions) expect_disallowed(*master_permissions) expect_disallowed(*owner_permissions) end @@ -213,6 +224,7 @@ describe GroupPolicy do it do expect_allowed(:read_group) expect_allowed(*reporter_permissions) + expect_allowed(*developer_permissions) expect_disallowed(*master_permissions) expect_disallowed(*owner_permissions) end @@ -224,6 +236,7 @@ describe GroupPolicy do it do expect_allowed(:read_group) expect_allowed(*reporter_permissions) + expect_allowed(*developer_permissions) expect_allowed(*master_permissions) expect_disallowed(*owner_permissions) end @@ -237,6 +250,7 @@ describe GroupPolicy do expect_allowed(:read_group) expect_allowed(*reporter_permissions) + expect_allowed(*developer_permissions) expect_allowed(*master_permissions) expect_allowed(*owner_permissions) end diff --git a/spec/policies/project_policy_spec.rb b/spec/policies/project_policy_spec.rb index 4dbaf7fb025..c0cbdeed03d 100644 --- a/spec/policies/project_policy_spec.rb +++ b/spec/policies/project_policy_spec.rb @@ -33,7 +33,7 @@ describe ProjectPolicy do let(:developer_permissions) do %i[ - admin_merge_request update_merge_request create_commit_status + admin_milestone admin_merge_request update_merge_request create_commit_status update_commit_status create_build update_build create_pipeline update_pipeline create_merge_request create_wiki push_code resolve_note create_container_image update_container_image @@ -44,7 +44,7 @@ describe ProjectPolicy do let(:master_permissions) do %i[ delete_protected_branch update_project_snippet update_environment - update_deployment admin_milestone admin_project_snippet + update_deployment admin_project_snippet admin_project_member admin_note admin_wiki admin_project admin_commit_status admin_build admin_container_image admin_pipeline admin_environment admin_deployment |