Skip to content

LG-11551 Read the correct PII for resend letter#9701

Merged
theabrad merged 3 commits intomainfrom
abrad-lg-11551-pii-from-resend-letter
Dec 5, 2023
Merged

LG-11551 Read the correct PII for resend letter#9701
theabrad merged 3 commits intomainfrom
abrad-lg-11551-pii-from-resend-letter

Conversation

@theabrad
Copy link
Contributor

@theabrad theabrad commented Dec 4, 2023

🎫 Ticket

LG-11551

📜 Testing Plan

Provide a checklist of steps to confirm the changes.

  • Go through Idv with and select verify by mail (changing the address to 1 GPO PENDING PROFILE ST. helps to identify)
  • Once the pending GPO profile is created go to rails console and create a duplicate profile and set gpo_verification_pending_at = nil for visibility purposes you can also change the pii of the address (console commands listed below).
  • On the enter code screen select "Send me another letter" and request another letter.
  • Verify that the address is the same GPO pending address on the enter code screen.

Rails console commands to create duplicate with different address:

# rails console
user = User.find_with_email('[EMAIL_USED_FOR_ACCOUNT]')
profile = user.gpo_verification_pending_profile
profile = profile.dup
pii = profile.decrypt_pii('[PASSWORD]')
pii.address1 = 'Non GPO Pending Profile'
pii.address2 = 'Non GPO Pending Profile'
pii.city = 'Pending Profile'
profile.active = false
profile.gpo_verification_pending_at = nil
profile.created_at = Time.zone.now
profile.encrypt_pii(pii, [PASSWORD])
profile.save!

changelog: Internal, IdV, Read the correct PII on resend letter
@theabrad theabrad requested a review from a team December 4, 2023 22:15
@soniaconnolly
Copy link
Contributor

soniaconnolly commented Dec 5, 2023

Nice test instructions! My test user didn't have an active profile, so I changed the second line to profile = user.pending_profile

I had struggles with getting the gpo_verification_pending_at values the way they were supposed to be, but once I sorted that out, this worked as expected.

Copy link
Contributor

@soniaconnolly soniaconnolly left a comment

Choose a reason for hiding this comment

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

LGTM

@theabrad theabrad merged commit 3044e09 into main Dec 5, 2023
@theabrad theabrad deleted the abrad-lg-11551-pii-from-resend-letter branch December 5, 2023 19:50
@solipet solipet mentioned this pull request Dec 7, 2023
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.

2 participants