Skip to content

Commit

Permalink
add test for lighthouse responding with 422
Browse files Browse the repository at this point in the history
  • Loading branch information
holdenhinkle committed Apr 5, 2024
1 parent 461faab commit 0476716
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/lib/lighthouse/benefits_claims/service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@
end
end
end

context 'when the API returns a 422 Unprocessable Entity error' do
it 'handles the error gracefully' do
VCR.use_cassette('lighthouse/benefits_claims/power_of_attorney/422_response') do
expect do
@service.get_power_of_attorney
end.to raise_error(Common::Exceptions::UnprocessableEntity)
end
end
end
end

describe 'when posting a form526' do
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0476716

Please sign in to comment.