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
|
@ -17,13 +17,12 @@ RSpec.describe 'API Markers' do
|
|||
end
|
||||
|
||||
it 'returns markers', :aggregate_failures do
|
||||
json = body_as_json
|
||||
|
||||
expect(response).to have_http_status(200)
|
||||
expect(json.key?(:home)).to be true
|
||||
expect(json[:home][:last_read_id]).to eq '123'
|
||||
expect(json.key?(:notifications)).to be true
|
||||
expect(json[:notifications][:last_read_id]).to eq '456'
|
||||
expect(body_as_json)
|
||||
.to include(
|
||||
home: include(last_read_id: '123'),
|
||||
notifications: include(last_read_id: '456')
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue