# frozen_string_literal: true RSpec.shared_examples 'a GET index request' do it 'returns a 200 http status and the requested resources' do get(route, headers:) expect(response).to have_http_status(200) resources = JSON.parse(response.body) expect(resources['data'].length).to eq(pagination_size) end end