|
97 | 97 | permissions(:report?) do |
98 | 98 | let(:reports_enabled) { true } |
99 | 99 |
|
100 | | - it 'grants access to everyone but the author' do |
| 100 | + it 'grants report permissions to everyone but the author' do |
101 | 101 | %i[external_user teacher admin].each do |factory_name| |
102 | 102 | expect(policy).to permit(create(factory_name, consumer: viewer_consumer, study_groups: viewer_study_groups), rfc) |
103 | 103 | end |
104 | 104 | expect(policy).not_to permit(rfc.author, rfc) |
105 | 105 | end |
106 | 106 |
|
107 | | - it 'grant access to other authors of the programming group' do |
| 107 | + it 'grant report permissions to other authors of the programming group' do |
108 | 108 | rfc.submission.update(contributor: programming_group) |
109 | 109 | expect(policy).to permit(viewer_other_group_member, rfc) |
110 | 110 | end |
|
135 | 135 | shared_examples 'grants report permissions to admins and other authors only' do |
136 | 136 | permissions(:report?) do |
137 | 137 | let(:reports_enabled) { true } |
138 | | - it 'grants access to admins' do |
| 138 | + |
| 139 | + it 'grants report permissions to admins' do |
139 | 140 | expect(policy).to permit(create(:admin, consumer: viewer_consumer, study_groups: viewer_study_groups), rfc) |
140 | 141 | end |
141 | 142 |
|
142 | | - it 'does not grant access to authors' do |
| 143 | + it 'does not grant report permissions to authors' do |
143 | 144 | expect(policy).not_to permit(rfc.author, rfc) |
144 | 145 | end |
145 | 146 |
|
146 | | - it 'grant access to other authors of the programming group' do |
| 147 | + it 'grant report permissions to other authors of the programming group' do |
147 | 148 | rfc.submission.update(contributor: programming_group) |
148 | 149 | expect(policy).to permit(viewer_other_group_member, rfc) |
149 | 150 | end |
150 | 151 |
|
151 | | - it 'does not grant access to all other users' do |
| 152 | + it 'does not grant report permissions to all other users' do |
152 | 153 | %i[external_user teacher].each do |factory_name| |
153 | 154 | expect(policy).not_to permit(create(factory_name, consumer: viewer_consumer, study_groups: viewer_study_groups), rfc) |
154 | 155 | end |
|
0 commit comments