Skip to content

Jskinne3 rdp2#7309

Merged
jskinne3 merged 15 commits intomainfrom
jskinne3-rdp2
Nov 9, 2022
Merged

Jskinne3 rdp2#7309
jskinne3 merged 15 commits intomainfrom
jskinne3-rdp2

Conversation

@jskinne3
Copy link
Contributor

@jskinne3 jskinne3 commented Nov 7, 2022

🎫 Ticket

LG-7907

🛠 Summary of changes

  • Delete ParameterDetails from JSON returned by LexisNexis RDP API
  • Include fixture of RDP2 response JSON
  • Test both RDP1 & RDP2 results

🚀 Notes for Deployment

None -- should work with RDP1 or RDP2 endpoint

@jskinne3 jskinne3 marked this pull request as draft November 7, 2022 22:22

it 'is a successful rdp2 result' do
stub_request(:post, verification_request.url).
to_return(body: LexisNexisFixtures.phone_finder_rdp2_success_response_json, status: 200)
Copy link
Contributor Author

@jskinne3 jskinne3 Nov 7, 2022

Choose a reason for hiding this comment

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

Do you think it is worthwhile to create separate RDP1 and RDP2 fixtures, and thus separate tests?

  • The tests are otherwise identical in the case of ProductStatus equal to pass responses
  • We don't yet have an official fail response from Monica (I recently asked for one)
  • A fail fixture will allow us to test if PII has been removed

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that this makes sense. I think a context for RDP1 and RDP2 makes sense at least until we are confident we are fully migrated to RDP2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do not seem to be getting an example fail case from LN so I guess I am ready to merge the tests I have.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update: I got a fail response example from LN and added it as the fixture rdp2_fail_response.json to this PR

@jskinne3 jskinne3 requested a review from a team November 7, 2022 22:49
end
next if product['ProductStatus'] == 'pass'

product.delete('ParameterDetails') # don't log reflected PII
Copy link
Contributor

Choose a reason for hiding this comment

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

So, I think we may want the parameter details of some of the products. I think we want to delete parameter details for just the phonefinder product

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the clarity. Changed!

@jskinne3 jskinne3 marked this pull request as ready for review November 8, 2022 19:12
@jskinne3 jskinne3 requested a review from jmhooper November 8, 2022 19:22
stub_request(:post, verification_request.url).
to_return(body: LexisNexisFixtures.phone_finder_rdp2_success_response_json, status: 200)

result = instance.proof(applicant)
Copy link
Contributor

Choose a reason for hiding this comment

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

This all looks good. Should we throw an expectation below somewhere to confirm that JSONified result doesn't include one of the PII fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test when the rdp2 response is a failure which I added below address this

@kbighorse
Copy link
Contributor

👍🏾

@jskinne3 jskinne3 merged commit f55ac1d into main Nov 9, 2022
@jskinne3 jskinne3 deleted the jskinne3-rdp2 branch November 9, 2022 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants