diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-27 09:08:28 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-27 09:08:28 +0000 |
commit | 6ac4a6713ed3196af899011f7e18658e16ebaac0 (patch) | |
tree | c60237cb5203d171481b765d31bfead080d063cf /spec/policies/note_policy_spec.rb | |
parent | d2b64c37bdef067656fdc8deb4728a2fbc6c2729 (diff) | |
download | gitlab-ce-6ac4a6713ed3196af899011f7e18658e16ebaac0.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/policies/note_policy_spec.rb')
-rw-r--r-- | spec/policies/note_policy_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/policies/note_policy_spec.rb b/spec/policies/note_policy_spec.rb index 94e6a86025c..e9dd5ee1c51 100644 --- a/spec/policies/note_policy_spec.rb +++ b/spec/policies/note_policy_spec.rb @@ -263,6 +263,7 @@ describe NotePolicy do let(:non_member) { create(:user) } let(:author) { create(:user) } let(:assignee) { create(:user) } + let(:admin) { create(:admin) } before do project.add_reporter(reporter) @@ -294,6 +295,10 @@ describe NotePolicy do expect(permissions(maintainer, confidential_note)).to be_allowed(:read_note, :admin_note, :resolve_note, :award_emoji) end + it 'allows admins to read all notes and admin them' do + expect(permissions(admin, confidential_note)).to be_allowed(:read_note, :admin_note, :resolve_note, :award_emoji) + end + it 'allows noteable author to read and resolve all notes' do expect(permissions(author, confidential_note)).to be_allowed(:read_note, :resolve_note, :award_emoji) expect(permissions(author, confidential_note)).to be_disallowed(:admin_note) |