diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-06 12:10:29 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-06 12:10:29 +0000 |
commit | 5564275a0b378298dc6281599cbfe71a937109ff (patch) | |
tree | a468e1e60046356410219c35c23a8a428c5e2c5e /spec/policies | |
parent | d87918510a866a5fcbbc2f899ad65c6938ebf5f5 (diff) | |
download | gitlab-ce-5564275a0b378298dc6281599cbfe71a937109ff.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/policies')
-rw-r--r-- | spec/policies/project_policy_spec.rb | 14 |
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 |