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

This commit is contained in:
Daniel M Brasil authored and Tarrien committed 2024-02-16 10:14:20 -05:00
1 parent 24cfaab748
commit 4396ad28ef
1 file changed
+8
@@ -91,5 +91,13 @@ RSpec.describe Api::V2::Admin::AccountsController 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