0
0
Fork 0

Fix HTTP 500 on POST /api/v1/admin/ip_blocks (#29308)

This commit is contained in:
Daniel M Brasil 2025-01-13 10:50:58 -03:00 committed by GitHub
parent 3a762cddf6
commit 0db7558822
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 1 deletions

View file

@ -187,6 +187,16 @@ RSpec.describe 'IP Blocks' do
.to start_with('application/json')
end
end
context 'when the given severity is invalid' do
let(:params) { { ip: '151.0.32.55', severity: 'invalid' } }
it 'returns http unprocessable entity' do
subject
expect(response).to have_http_status(422)
end
end
end
describe 'PUT /api/v1/admin/ip_blocks/:id' do