diff options
Diffstat (limited to 'spec/policies/issue_policy_spec.rb')
-rw-r--r-- | spec/policies/issue_policy_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/policies/issue_policy_spec.rb b/spec/policies/issue_policy_spec.rb index 2756f8b196d..7ca4baddb79 100644 --- a/spec/policies/issue_policy_spec.rb +++ b/spec/policies/issue_policy_spec.rb @@ -309,18 +309,23 @@ RSpec.describe IssuePolicy do it 'forbids visitors from viewing issues' do expect(permissions(visitor, issue)).to be_disallowed(:read_issue) end + it 'forbids visitors from commenting' do expect(permissions(visitor, issue)).to be_disallowed(:create_note) end + it 'forbids visitors from subscribing' do expect(permissions(visitor, issue)).to be_disallowed(:update_subscription) end + it 'allows guests to view' do expect(permissions(guest, issue)).to be_allowed(:read_issue) end + it 'allows guests to comment' do expect(permissions(guest, issue)).to be_allowed(:create_note) end + it 'allows guests to subscribe' do expect(permissions(guest, issue)).to be_allowed(:update_subscription) end |