Fix incorrect pagination headers in /api/v2/admin/accounts (#25477)

This commit is contained in:
Daniel M Brasil 2023-06-19 03:53:05 -03:00 committed by Tarrien
parent 7b33586b67
commit 0145df3268

View File

@ -86,5 +86,13 @@ RSpec.describe 'API V2 Admin Accounts' 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
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