Fix incorrect pagination headers in /api/v2/admin/accounts
(#25477)
This commit is contained in:
parent
0a0a1f1495
commit
b9bc9d0bda
2 changed files with 16 additions and 0 deletions
|
@ -55,5 +55,13 @@ RSpec.describe Api::V2::Admin::AccountsController do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'with limit param' do
|
||||
let(:params) { { limit: 1 } }
|
||||
|
||||
it 'sets the correct pagination headers' do
|
||||
expect(response.headers['Link'].find_link(%w(rel next)).href).to eq api_v2_admin_accounts_url(limit: 1, max_id: admin_account.id)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue