diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-30 21:08:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-30 21:08:56 +0300 |
commit | 98d7cc758fb73239fb957c297446c811ab4150d9 (patch) | |
tree | 227a5e8efe35d2ac158e762397609a3f1754b224 /spec/policies/issue_policy_spec.rb | |
parent | 038366a0932c5f88019cc3db85382f26af3933e7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/policies/issue_policy_spec.rb')
-rw-r--r-- | spec/policies/issue_policy_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/policies/issue_policy_spec.rb b/spec/policies/issue_policy_spec.rb index e352b990159..76788ae2cb7 100644 --- a/spec/policies/issue_policy_spec.rb +++ b/spec/policies/issue_policy_spec.rb @@ -139,8 +139,13 @@ RSpec.describe IssuePolicy do create(:project_group_link, group: group, project: project) end + it 'does not allow guest to create todos' do + expect(permissions(nil, issue)).to be_allowed(:read_issue) + expect(permissions(nil, issue)).to be_disallowed(:create_todo) + end + it 'allows guests to read issues' do - expect(permissions(guest, issue)).to be_allowed(:read_issue, :read_issue_iid) + expect(permissions(guest, issue)).to be_allowed(:read_issue, :read_issue_iid, :create_todo) expect(permissions(guest, issue)).to be_disallowed(:update_issue, :admin_issue, :reopen_issue) expect(permissions(guest, issue_no_assignee)).to be_allowed(:read_issue, :read_issue_iid) |