Fixes GHSA-62j4-hvj7-px3f
This commit is contained in:
1 parent
d8e613a35c
commit
63eae9292e
34 files changed
+134
No files matched your search
@@ -22,3 +22,14 @@ RSpec.shared_examples 'forbidden for wrong role' do |wrong_role|
|
||||
expect(response).to have_http_status(403)
|
||||
end
|
||||
end
|
||||
|
||||
RSpec.shared_examples 'forbidden for disabled user' do
|
||||
let(:user) { Fabricate(:admin_user, disabled: true) }
|
||||
|
||||
it 'returns http forbidden' do
|
||||
# Some examples have a subject which needs to be called to make a request
|
||||
subject if request.nil?
|
||||
|
||||
expect(response).to have_http_status(403)
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user