Use include_pagination_headers in more places (#30999)

This commit is contained in:
Matt Jankowski 2024-07-12 04:30:52 -04:00 committed by GitHub
parent 28ad3588e4
commit 43e24dbb13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 31 additions and 42 deletions

View file

@ -20,8 +20,12 @@ RSpec.describe 'API V1 Conversations' do
it 'returns pagination headers', :aggregate_failures do
get '/api/v1/conversations', params: { limit: 1 }, headers: headers
expect(response).to have_http_status(200)
expect(response.headers['Link'].links.size).to eq(2)
expect(response)
.to have_http_status(200)
.and include_pagination_headers(
prev: api_v1_conversations_url(limit: 1, min_id: Status.first.id),
next: api_v1_conversations_url(limit: 1, max_id: Status.first.id)
)
end
it 'returns conversations', :aggregate_failures do