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
|
@ -29,8 +29,10 @@ RSpec.describe 'API V1 Statuses Favourited by Accounts' do
|
|||
|
||||
expect(response)
|
||||
.to have_http_status(200)
|
||||
expect(response.headers['Link'].links.size)
|
||||
.to eq(2)
|
||||
.and include_pagination_headers(
|
||||
prev: api_v1_status_favourited_by_index_url(limit: 2, since_id: Favourite.last.id),
|
||||
next: api_v1_status_favourited_by_index_url(limit: 2, max_id: Favourite.first.id)
|
||||
)
|
||||
|
||||
expect(body_as_json.size)
|
||||
.to eq(2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue