-
Notifications
You must be signed in to change notification settings - Fork 166
LG-10886 start moving ssn to idv session #9129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d41f78d
50ab3dd
1f50d21
f702fb4
1751657
a7f96bd
4ae351f
76b1501
5f15815
72bc6fb
c077f5e
47043c8
6922037
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,10 +6,8 @@ | |
| let(:pii_from_user) { Idp::Constants::MOCK_IDV_APPLICANT_SAME_ADDRESS_AS_ID_WITH_NO_SSN.dup } | ||
|
|
||
| let(:flow_session) do | ||
| { 'document_capture_session_uuid' => 'fd14e181-6fb1-4cdc-92e0-ef66dad0df4e', | ||
| :pii_from_user => pii_from_user, | ||
| :threatmetrix_session_id => 'c90ae7a5-6629-4e77-b97c-f1987c2df7d0', | ||
| :flow_path => 'standard' } | ||
| { pii_from_user: pii_from_user, | ||
| flow_path: 'standard' } | ||
| end | ||
|
|
||
| let(:ssn) { Idp::Constants::MOCK_IDV_APPLICANT_WITH_SSN[:ssn] } | ||
|
|
@@ -83,7 +81,7 @@ | |
| expect { get :show }.to change { subject.idv_session.threatmetrix_session_id }.from(nil) | ||
| end | ||
|
|
||
| context 'with an ssn in session' do | ||
| context 'with an ssn in flow_session' do | ||
| let(:referer) { idv_in_person_step_url(step: :address) } | ||
| before do | ||
| flow_session[:pii_from_user][:ssn] = ssn | ||
|
|
@@ -107,6 +105,31 @@ | |
| end | ||
| end | ||
| end | ||
|
|
||
| context 'with an ssn in idv_session' do | ||
| let(:referer) { idv_in_person_step_url(step: :address) } | ||
| before do | ||
| subject.idv_session.ssn = ssn | ||
| request.env['HTTP_REFERER'] = referer | ||
| end | ||
|
|
||
| context 'referer is not verify_info' do | ||
| it 'redirects to verify_info' do | ||
| get :show | ||
|
|
||
| expect(response).to redirect_to(idv_in_person_verify_info_url) | ||
| end | ||
| end | ||
|
|
||
| context 'referer is verify_info' do | ||
| let(:referer) { idv_in_person_verify_info_url } | ||
| it 'does not redirect' do | ||
| get :show | ||
|
|
||
| expect(response).to render_template :show | ||
| end | ||
| end | ||
| end | ||
| end | ||
|
|
||
| describe '#update' do | ||
|
|
@@ -126,16 +149,6 @@ | |
| }.merge(ab_test_args) | ||
| end | ||
|
|
||
| let(:idv_session) do | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This |
||
| { | ||
| applicant: Idp::Constants::MOCK_IDV_APPLICANT, | ||
| resolution_successful: true, | ||
| profile_confirmation: true, | ||
| vendor_phone_confirmation: true, | ||
| user_phone_confirmation: true, | ||
| } | ||
| end | ||
|
|
||
| it 'sends analytics_submitted event' do | ||
| put :update, params: params | ||
|
|
||
|
|
@@ -156,14 +169,18 @@ | |
| expect(flow_session[:pii_from_user][:ssn]).to eq(ssn) | ||
| end | ||
|
|
||
| it 'adds ssn to idv_session' do | ||
| put :update, params: params | ||
|
|
||
| expect(subject.idv_session.ssn).to eq(ssn) | ||
| end | ||
|
|
||
| it 'invalidates steps after ssn' do | ||
| subject.idv_session.applicant = Idp::Constants::MOCK_IDV_APPLICANT | ||
|
|
||
| put :update, params: params | ||
|
|
||
| expect(subject.idv_session.applicant).to be_blank | ||
| expect(subject.idv_session.resolution_successful).to be_blank | ||
| expect(subject.idv_session.profile_confirmation).to be_blank | ||
| expect(subject.idv_session.vendor_phone_confirmation).to be_blank | ||
| expect(subject.idv_session.user_phone_confirmation).to be_blank | ||
|
Comment on lines
-163
to
-166
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These attributes are deleted from the spec because they have to be blank because they are set later by the phone step or review step, and ssn step can't be accessed when they are set. |
||
| end | ||
|
|
||
| it 'redirects to the expected page' do | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially I thought we needed to make an update to line 70 to include an or statement but whether Remote (pii_from_doc) or IPP (pii_from_user) - if idv_session.ssn was present, line 68 would return it so it would not make it past. Nothing to change - just writing my thoughts.