2
0

Specs for validation error in API responses (#36507)

This commit is contained in:
Matt Jankowski
2025-10-21 03:33:30 -04:00
committed by GitHub
parent 74172ced81
commit 2eccd7b53c
2 changed files with 10 additions and 0 deletions

View File

@@ -118,6 +118,11 @@ RSpec.describe '/api/v1/accounts' do
.to have_http_status(422)
expect(response.content_type)
.to start_with('application/json')
expect(response.parsed_body)
.to include(
error: /Validation failed/,
details: include(date_of_birth: contain_exactly(include(error: 'ERR_BELOW_LIMIT', description: /below the age limit/)))
)
end
end