Conversation
| # transaction_id comes from ConversationId | ||
| add_cost(:lexis_nexis_resolution, transaction_id: hash[:transaction_id]) | ||
| elsif stage == :residential_address | ||
| next if hash[:vendor_name] == 'ResidentialAddressNotRequired' |
There was a problem hiding this comment.
if going through remote resident address check is skipped
| it 'adds costs' do | ||
| allow(controller).to receive(:load_async_state).and_return(async_state) | ||
| allow(async_state).to receive(:done?).and_return(true) | ||
| allow(async_state).to receive(:result).and_return(adjudicated_result) |
There was a problem hiding this comment.
adjudicated result reflects result when a user goes through ipp. Stages in result appears to be the same whether or not the user's residential address matches their state id.
There was a problem hiding this comment.
Want to check if this is accurate re:Expected costs that should be tracked/added in db
remote, aamva supported state:
threatmetrix cost x 1 (threatmetrix stage)
lexis nexis cost x 1 (resolution stage)
aamva cost x 1 (state id stage)
remote, aamva unsupported state:
threatmetrix cost x 1 (threatmetrix stage)
lexis nexis cost x 1 (resolution stage)
ipp, aamva supported state, same_address_as_id is true:
threatmetrix cost x 1 (threatmetrix stage)
lexis nexis cost x 2 (resolution stage, residential stage)
aamva cost x 1 (state id stage)
ipp, aamva unsupported state, same_address_as_id is true:
threatmetrix cost x 1 (threatmetrix stage)
lexis nexis cost x 2 (resolution stage, residential stage)
ipp, aamva supported state, same_address_as_id is false:
threatmetrix cost x 1 (threatmetrix stage)
lexis nexis cost x 2 (resolution stage, residential stage)
aamva cost x 1 (state id stage)
ipp, aamva unsupported state, same_address_as_id is false:
threatmetrix cost x 1 (threatmetrix stage)
lexis nexis cost x 2 (resolution stage, residential stage)
|
@svalexander what is resolution stage vs residential stage? |
|
@daviddsilvanava That's a good question. When I look at the result adjudicator what i see is this: resolution_result:, # InstantVerify So it looks like 2 different instantverify checks? |
|
@eileen-nava what is the difference between the InstantVerify check and the InstantVerify Residential checks mentioned above/found in the result_adjudicator? |
I think resolution = state ID and residential = current address, when the user marks they're at a different address than their ID. ipp, aamva supported state, same_address_as_id is true: ipp, aamva supported state, same_address_as_id is false: --> this looks correct. iirc, the other things to keep in mind is that we run the checks serially. so if they fail one, we abandon the others. i don't remember what order we do them in though. |
|
Hi, I agree with what David said above. If double address verification is enabled, which it is for IPP, and the address on the user’s license matches the address they live at, there will only be one call to LexisNexis InstantVerify. When a user goes through IPP and the address on their license does not match the address they live at, there will be two calls to LexisNexis InstantVerify. |
soniaconnolly
left a comment
There was a problem hiding this comment.
LGTM, with a spec suggestion.
I don't know off-hand what the results should be, which is one reason to add the spec on the remote side and make sure the results are what you expect. I have not run through your test plan - let me know if you'd like me to.
| let(:pii) do | ||
| { same_address_as_id: 'true' } | ||
| end | ||
|
|
||
| it 'adds costs to database' do | ||
| allow(subject).to receive(:pii).and_return(pii) |
There was a problem hiding this comment.
This is overall a great addition to the specs! We could think about adding a similar one to the remote verify_info_controller_spec, not necessarily in this PR. That also brings up thoughts about how the cost calculation should be part of progressive proofer rather than verify info concern, but again, not a problem for this PR.
Let's cut down on the amount of stubbing so we can have more confidence in our specs. You already have a let for pii_from_user at the top, and it's hooked into user_session on line 20. If the suggestion below doesn't work, you might have to specify the whole thing: user_session['idv/in_person'][:pii_from_user]...
Same suggestion for all the specs below to set :same_address_as_id to the desired value.
| let(:pii) do | |
| { same_address_as_id: 'true' } | |
| end | |
| it 'adds costs to database' do | |
| allow(subject).to receive(:pii).and_return(pii) | |
| it 'adds costs to database' do | |
| pii_from_user[:same_address_as_id] = true |
There was a problem hiding this comment.
I definitely think that's a good call out about moving the file where the costs are added to the db. Matt W. also made that point. It would definitely make sense to move it as it would be a lot more clear what's happening as the cost is occurring in the progressive proofer. I'll add a ticket for that.
I'll update the spec, this is definitely cleaner.
There was a problem hiding this comment.
I updated the spec and found I didn't need to update the value of same_address_as_id in the it block
There was a problem hiding this comment.
Ticket to move the cost tracking to the progressive proofer
| transaction_id: 'resolution-mock-transaction-id-123', | ||
| vendor_name: 'ResolutionMock', | ||
| }, | ||
| residential_address: { |
There was a problem hiding this comment.
Is there a reason this is just called residential_address and not something like resolution_residential_address? I had to go look in progressive proofer to make sure they were parallel. Once again not necessarily for this PR, but a naming change to consider.
There was a problem hiding this comment.
the stage is named residential_address currently, i think it was named that way to reflect the stage that already existed named state_id - just the name of what was proofed.
There was a problem hiding this comment.
Seems like the whole naming scheme could use some attention at some point, although the 50/50 state makes it a hassle to change.
|
@svalexander I am not getting the expected SpCost values from the database when doing a test run through. Can we meet to make sure I'm doing it correctly? |
@JackRyan1989, I was just testing this before standup and Shannon and I realized that the query needs to be SpCost.last(10) and check the timestamps, because SpCost doesn't have the user_id. |
|
@JackRyan1989 i just updated the test instructions |
🎫 Ticket
LG-11202
🛠 Summary of changes
Adds cost tracking for second Lexis Nexis Instant Verify check when user's residential address differs from the address on their state id.
📜 Testing Plan
Provide a checklist of steps to confirm the changes.
Remote Cost
rails cSpCost.last({num > 4})Ipp Cost - same_address_as_id = true
rails cSpCost.last({num > 4})Ipp Cost - same_address_as_id = false
rails cSpCost.last({num > 4})