Add coverage for "too many IDs" scenario in `api/v1/statuses` (#37699)

pull/37704/head
Matt Jankowski 3 weeks ago committed by GitHub
parent d0cd436ac9
commit 9de54635ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -25,6 +25,19 @@ RSpec.describe '/api/v1/statuses' do
hash_including(id: other_status.id.to_s)
)
end
context 'with too many IDs' do
before { stub_const 'Api::BaseController::DEFAULT_STATUSES_LIMIT', 2 }
it 'returns error response' do
get '/api/v1/statuses', headers: headers, params: { id: [123, 456, 789] }
expect(response)
.to have_http_status(422)
expect(response.content_type)
.to start_with('application/json')
end
end
end
describe 'GET /api/v1/statuses/:id' do

Loading…
Cancel
Save