0
0
Fork 0

Combine repeated parsed_body assertions into single (#32002)

This commit is contained in:
Matt Jankowski 2024-09-23 04:42:52 -04:00 committed by GitHub
parent 5fae1d55e5
commit e0b45b35c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 12 deletions

View file

@ -82,8 +82,11 @@ RSpec.describe 'Tags' do
expect(response.content_type)
.to start_with('application/json')
expect(response.parsed_body[:id].to_i).to eq(tag.id)
expect(response.parsed_body[:name]).to eq(tag.name)
expect(response.parsed_body)
.to include(
id: tag.id.to_s,
name: tag.name
)
end
context 'when the requested tag does not exist' do
@ -116,8 +119,11 @@ RSpec.describe 'Tags' do
expect(response.content_type)
.to start_with('application/json')
expect(response.parsed_body[:id].to_i).to eq(tag.id)
expect(response.parsed_body[:name]).to eq(tag.name.upcase)
expect(response.parsed_body)
.to include(
id: tag.id.to_s,
name: tag.name.upcase
)
end
context 'when the updated display name is invalid' do