We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0b039a commit a5392c1Copy full SHA for a5392c1
spec/policies/request_for_comment_policy_spec.rb
@@ -57,11 +57,15 @@
57
context 'when report emails are configured' do
58
let(:reports_enabled) { true }
59
60
- it 'allows anyone to report RfCs' do
+ it 'allows anyone to report RfCs expect the author' do
61
%i[admin external_user teacher].each do |factory_name|
62
- expect(policy).to permit(create(factory_name), create(:rfc))
+ expect(policy).to permit(create(factory_name), rfc)
63
end
64
65
+
66
+ it 'blocks authors from reporting their content' do
67
+ expect(policy).not_to permit(rfc.author, rfc)
68
+ end
69
70
71
context 'when no report email is configured' do
0 commit comments