Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion app/services/proofing/mock/ddp_mock_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,27 @@ class DdpMockClient < Proofing::Base

TRANSACTION_ID = 'ddp-mock-transaction-id-123'

# Trigger the "REJECT" status
REJECT_STATUS_SSN = '666-77-8888'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add unit tests for these?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


# Trigger the "REVIEW" status
REVIEW_STATUS_SSN = '666-77-9999'

# Trigger a nil status
NIL_STATUS_SSN = '666-77-0000'

proof do |applicant, result|
result.transaction_id = TRANSACTION_ID
result.review_status = 'pass'
result.review_status = case SsnFormatter.format(applicant[:ssn])
when REJECT_STATUS_SSN
'reject'
when REVIEW_STATUS_SSN
'review'
when NIL_STATUS_SSN
nil
else
'pass'
end
end
end
end
Expand Down