Prefer structure checks over multi-line size/parts checks in parsed_body (#32063)

This commit is contained in:
Matt Jankowski 2024-09-25 09:54:22 -04:00 committed by GitHub
parent d6f5ee75ab
commit 51777fe3e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 60 additions and 37 deletions

View file

@ -55,10 +55,10 @@ RSpec.describe 'API Peers Search' do
.to have_http_status(200)
expect(response.content_type)
.to start_with('application/json')
expect(response.parsed_body.size)
.to eq(1)
expect(response.parsed_body.first)
.to eq(account.domain)
expect(response.parsed_body)
.to contain_exactly(
eq(account.domain)
)
end
end
end