summaryrefslogtreecommitdiff
path: root/spec/policies/project_policy_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/policies/project_policy_spec.rb')
-rw-r--r--spec/policies/project_policy_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/policies/project_policy_spec.rb b/spec/policies/project_policy_spec.rb
index 1a4b8315fde..3b08726c75a 100644
--- a/spec/policies/project_policy_spec.rb
+++ b/spec/policies/project_policy_spec.rb
@@ -559,4 +559,18 @@ describe ProjectPolicy do
end
end
end
+
+ context 'alert bot' do
+ let(:current_user) { User.alert_bot }
+
+ subject { described_class.new(current_user, project) }
+
+ it { is_expected.to be_allowed(:reporter_access) }
+
+ context 'within a private project' do
+ let(:project) { create(:project, :private) }
+
+ it { is_expected.to be_allowed(:admin_issue) }
+ end
+ end
end