Audofix Rubocop Style/WordArray (#23739)
This commit is contained in:
parent
4552685f6b
commit
bf785df9fe
17 changed files with 27 additions and 50 deletions
|
@ -37,13 +37,13 @@ RSpec.describe Api::V1::BlocksController, type: :controller do
|
|||
it 'sets pagination header for next path' do
|
||||
blocks = 2.times.map { Fabricate(:block, account: user.account) }
|
||||
get :index, params: { limit: 1, since_id: blocks[0] }
|
||||
expect(response.headers['Link'].find_link(['rel', 'next']).href).to eq api_v1_blocks_url(limit: 1, max_id: blocks[1])
|
||||
expect(response.headers['Link'].find_link(%w(rel next)).href).to eq api_v1_blocks_url(limit: 1, max_id: blocks[1])
|
||||
end
|
||||
|
||||
it 'sets pagination header for previous path' do
|
||||
block = Fabricate(:block, account: user.account)
|
||||
get :index
|
||||
expect(response.headers['Link'].find_link(['rel', 'prev']).href).to eq api_v1_blocks_url(since_id: block)
|
||||
expect(response.headers['Link'].find_link(%w(rel prev)).href).to eq api_v1_blocks_url(since_id: block)
|
||||
end
|
||||
|
||||
it 'returns http success' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue