Use enum validation instead of ArgumentError
rescue for List
replies policy check (#34452)
This commit is contained in:
parent
5991caae87
commit
2eaef09166
3 changed files with 5 additions and 6 deletions
|
@ -132,9 +132,12 @@ RSpec.describe 'Lists' do
|
|||
it 'returns http unprocessable entity' do
|
||||
subject
|
||||
|
||||
expect(response).to have_http_status(422)
|
||||
expect(response)
|
||||
.to have_http_status(422)
|
||||
expect(response.content_type)
|
||||
.to start_with('application/json')
|
||||
expect(response.parsed_body)
|
||||
.to include(error: /Replies policy is not included/)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue