mirror of
https://github.com/mastodon/mastodon.git
synced 2026-04-24 23:29:30 -05:00
Add coverage for "too many IDs" scenario in api/v1/statuses (#37699)
This commit is contained in:
parent
d0cd436ac9
commit
9de54635ed
|
|
@ -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…
Reference in New Issue
Block a user