Skip to content

Commit

Permalink
Fix a typo in the ThreatMetrixPlugin (#11526)
Browse files Browse the repository at this point in the history
It looks like in 1767dd5 we introduced a typo where `request_ip` was spelled `request_id`. This resulted in us sending a null `request_ip` to Threatmetrix.

This commit fixes the typo and modifies a spec to make sure the expected arguments are sent to the proofer.

[skip changelog]
  • Loading branch information
jmhooper authored Nov 19, 2024
1 parent cb78561 commit 1934da1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def call(
ddp_pii = applicant_pii.merge(
threatmetrix_session_id: threatmetrix_session_id,
email: user_email,
request_id: request_ip,
request_ip: request_ip,
)

timer.time('threatmetrix') do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ def sp_cost_count

it 'calls the ThreatMetrix proofer' do
call
expect(plugin.proofer).to have_received(:proof)
expect(plugin.proofer).to have_received(:proof).with(
**applicant_pii,
threatmetrix_session_id: threatmetrix_session_id,
email: user_email,
request_ip: request_ip,
)
end

it 'creates a ThreatMetrix associated cost' do
Expand Down

0 comments on commit 1934da1

Please sign in to comment.