Use include_pagination_headers
in more places (#30999)
This commit is contained in:
parent
28ad3588e4
commit
43e24dbb13
5 changed files with 31 additions and 42 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue