summaryrefslogtreecommitdiff
path: root/spec/policies/project_policy_spec.rb
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-04-06 20:19:37 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-04-11 10:51:43 +0200
commit04c7d0d55500e6f118bd17153f3af11e83fce826 (patch)
tree7976d051ad4138dd020e78e2fd616f0791bd7123 /spec/policies/project_policy_spec.rb
parent71ccfde322b633e9245bee6acba1e64cb7640f19 (diff)
downloadgitlab-ce-04c7d0d55500e6f118bd17153f3af11e83fce826.tar.gz
Prevent awarding emoji when a project is archived
This prevents performing the requests, and disables all emoji reaction buttons
Diffstat (limited to 'spec/policies/project_policy_spec.rb')
-rw-r--r--spec/policies/project_policy_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/policies/project_policy_spec.rb b/spec/policies/project_policy_spec.rb
index 33d5a61c563..8b9c4ac0b4b 100644
--- a/spec/policies/project_policy_spec.rb
+++ b/spec/policies/project_policy_spec.rb
@@ -15,6 +15,7 @@ describe ProjectPolicy do
read_project_for_iids read_issue_iid read_merge_request_iid read_label
read_milestone read_project_snippet read_project_member read_note
create_project create_issue create_note upload_file create_merge_request_in
+ award_emoji
]
end
@@ -166,6 +167,7 @@ describe ProjectPolicy do
request_access
upload_file
resolve_note
+ award_emoji
]
end
@@ -193,7 +195,7 @@ describe ProjectPolicy do
context 'when a project has pending invites' do
let(:group) { create(:group, :public) }
let(:project) { create(:project, :public, namespace: group) }
- let(:user_permissions) { [:create_merge_request_in, :create_project, :create_issue, :create_note, :upload_file] }
+ let(:user_permissions) { [:create_merge_request_in, :create_project, :create_issue, :create_note, :upload_file, :award_emoji] }
let(:anonymous_permissions) { guest_permissions - user_permissions }
subject { described_class.new(nil, project) }