Support min_id-based pagination for bookmarks (#12381)
* Support min_id-based pagination for bookmarks * Fix spec
This commit is contained in:
parent
df15a2cd37
commit
5a2c0707f1
2 changed files with 4 additions and 5 deletions
|
@ -64,7 +64,7 @@ RSpec.describe Api::V1::BookmarksController, type: :controller do
|
|||
get :index, params: { limit: 1 }
|
||||
|
||||
expect(response.headers['Link'].find_link(['rel', 'next']).href).to eq "http://test.host/api/v1/bookmarks?limit=1&max_id=#{bookmark.id}"
|
||||
expect(response.headers['Link'].find_link(['rel', 'prev']).href).to eq "http://test.host/api/v1/bookmarks?limit=1&since_id=#{bookmark.id}"
|
||||
expect(response.headers['Link'].find_link(['rel', 'prev']).href).to eq "http://test.host/api/v1/bookmarks?limit=1&min_id=#{bookmark.id}"
|
||||
end
|
||||
|
||||
it 'does not add pagination headers if not necessary' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue