LG-16384: passport cards are not state ids#12310
Conversation
There was a problem hiding this comment.
We should also test for passport_card in doc_pii_form_spec.rb. I didn't make a test for this because I tested all the scenarios in doc_pii_form_spec, but this is a nice addition!
AShukla-GSA
left a comment
There was a problem hiding this comment.
LGTM, although other comment suggestions are a good idea!
app/forms/idv/doc_pii_passport.rb
Outdated
There was a problem hiding this comment.
I found myself doing a double-take on this method name since it's checking for passport cards but named passport_book?. Would passport_card_not_supported? or validate_not_passport_card be clearer?
There was a problem hiding this comment.
Changed it to not_passport_book? in 9e55565
There was a problem hiding this comment.
Actually, per Amir's comment, I changed it back to passport_book? but fail if id_doc_type is anything but 'passport' in 03a86f2
There was a problem hiding this comment.
What do you think about extracting this to a constant like PASSPORT_CARD_ISSUE_TYPE? Might help if we need to reference this LexisNexis value elsewhere or if it ever changes.
Mawar2
left a comment
There was a problem hiding this comment.
LGTM - left 2 minor comments but good to merge as-is.
Fixes a bug where passport cards were being recorded with an id_doc_type of state_id_card. Also adds guards to reject any passport deemed passed by LN if passports are disabled on our end. changelog: Bug Fixes, Passports, Correct the id_doc_type for passport cards. Co-authored-by: Shane Chesnutt <shane.chesnutt@gsa.gov> Co-authored-by: William Birdsall <william.birdsall@gsa.gov> Co-authored-by: Abir Shukla <abir.shukla@gsa.gov> Co-authored-by: Alexander Bradley <alexander.bradley@gsa.gov> Co-authored-by: Mitchell Henke <mitchell.henke@gsa.gov>
app/forms/idv/doc_pii_passport.rb
Outdated
There was a problem hiding this comment.
| if pii_from_doc[:id_doc_type] == 'passport_card' | |
| if pii_from_doc[:id_doc_type] != 'passport' |
could be helpful if not 'passport' to make any values not a passport throw the error
ee3d336 to
9e55565
Compare
… the id_doc_type is "passport"
🎫 Ticket
Link to the relevant ticket:
LG-16384
🛠 Summary of changes
Check for the DocIssueType to see if the presented id is a passport card and set the id_doc_type appropriately.
Fails doc auth when passport card and fails doc auth when passport presented but passports are not enabled.
📜 Testing Plan
Specs pass