diff --git a/spec/requests/api/v1/admin/domain_blocks_spec.rb b/spec/requests/api/v1/admin/domain_blocks_spec.rb index d0a94b5d0c..0b01d04f9a 100644 --- a/spec/requests/api/v1/admin/domain_blocks_spec.rb +++ b/spec/requests/api/v1/admin/domain_blocks_spec.rb @@ -225,7 +225,9 @@ RSpec.describe 'Domain Blocks' do subject expect(response).to have_http_status(422) - expect(body_as_json[:error]).to eq('Validation failed: Severity is not included in the list') + expect(response.content_type) + .to start_with('application/json') + expect(response.parsed_body[:error]).to eq('Validation failed: Severity is not included in the list') end end end