Use body_as_json
directly instead of via local var assignment (#31696)
This commit is contained in:
parent
e5155c50fd
commit
24a0b20408
15 changed files with 123 additions and 113 deletions
|
@ -32,10 +32,8 @@ RSpec.describe 'Suggestions' do
|
|||
it 'returns accounts' do
|
||||
subject
|
||||
|
||||
body = body_as_json
|
||||
|
||||
expect(body.size).to eq 2
|
||||
expect(body.pluck(:id)).to match_array([bob, jeff].map { |i| i.id.to_s })
|
||||
expect(body_as_json)
|
||||
.to contain_exactly(include(id: bob.id.to_s), include(id: jeff.id.to_s))
|
||||
end
|
||||
|
||||
context 'with limit param' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue