Combine API request spec assertions (#31970)
This commit is contained in:
parent
1fce55cf5d
commit
b071e618e7
21 changed files with 36 additions and 232 deletions
|
@ -123,15 +123,11 @@ RSpec.describe 'Link' do
|
|||
context 'with limit param' do
|
||||
let(:params) { { limit: 1, url: url } }
|
||||
|
||||
it 'returns only the requested number of statuses', :aggregate_failures do
|
||||
it 'returns only the requested number of statuses with pagination headers', :aggregate_failures do
|
||||
subject
|
||||
|
||||
expect(response).to have_http_status(200)
|
||||
expect(response.parsed_body.size).to eq(params[:limit])
|
||||
end
|
||||
|
||||
it 'sets the correct pagination headers', :aggregate_failures do
|
||||
subject
|
||||
|
||||
expect(response)
|
||||
.to include_pagination_headers(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue