Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/forms/gpo_verify_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def submit(is_enhanced_ipp)
pii_like_keypaths: [[:errors, :otp], [:error_details, :otp]],
pending_in_person_enrollment: !!pending_profile&.in_person_enrollment&.pending?,
fraud_check_failed: fraud_check_failed,
initiating_service_provider: pending_profile&.initiating_service_provider_issuer,
},
)
end
Expand Down
3 changes: 3 additions & 0 deletions app/services/analytics_events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5253,6 +5253,7 @@ def idv_usps_auth_token_refresh_job_started(**extra)
# @param [Integer] which_letter Sorted by enqueue time, which letter had this code
# @param [Integer] letter_count How many letters did the user enqueue for this profile
# @param [Integer] profile_age_in_seconds How many seconds have passed since profile created
# @param [String] initiating_service_provider The initiating service provider issuer
# @param [Integer] submit_attempts Number of attempts to enter a correct code
# (previously called "attempts")
# @param [Boolean] pending_in_person_enrollment
Expand All @@ -5267,6 +5268,7 @@ def idv_verify_by_mail_enter_code_submitted(
which_letter:,
letter_count:,
profile_age_in_seconds:,
initiating_service_provider:,
submit_attempts:,
pending_in_person_enrollment:,
fraud_check_failed:,
Expand All @@ -5282,6 +5284,7 @@ def idv_verify_by_mail_enter_code_submitted(
which_letter:,
letter_count:,
profile_age_in_seconds:,
initiating_service_provider:,
submit_attempts:,
pending_in_person_enrollment:,
fraud_check_failed:,
Expand Down
8 changes: 8 additions & 0 deletions spec/controllers/idv/by_mail/enter_code_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,11 @@

let(:user) { create(:user, :with_pending_gpo_profile, created_at: 2.days.ago) }
let!(:pending_profile) { user.gpo_verification_pending_profile }
let(:initiating_service_provider) { create(:service_provider) }
let(:success) { true }

before { pending_profile.update!(initiating_service_provider:) }

it 'uses the PII from the pending profile' do
# action will make the profile active, so grab the ID here.
pending_profile_id = pending_profile.id
Expand All @@ -202,6 +205,7 @@
fraud_check_failed: false,
enqueued_at: pending_profile.gpo_confirmation_codes.last.code_sent_at,
profile_age_in_seconds: instance_of(Integer),
initiating_service_provider: initiating_service_provider.issuer,
which_letter: 1,
letter_count: 1,
submit_attempts: 1,
Expand Down Expand Up @@ -247,6 +251,7 @@
fraud_check_failed: false,
enqueued_at: pending_profile.gpo_confirmation_codes.last.code_sent_at,
profile_age_in_seconds: instance_of(Integer),
initiating_service_provider: initiating_service_provider.issuer,
which_letter: 1,
letter_count: 1,
submit_attempts: 1,
Expand Down Expand Up @@ -276,6 +281,7 @@
fraud_check_failed: true,
enqueued_at: pending_profile.gpo_confirmation_codes.last.code_sent_at,
profile_age_in_seconds: instance_of(Integer),
initiating_service_provider: initiating_service_provider.issuer,
which_letter: 1,
letter_count: 1,
submit_attempts: 1,
Expand Down Expand Up @@ -313,6 +319,7 @@
fraud_check_failed: true,
enqueued_at: user.pending_profile.gpo_confirmation_codes.last.code_sent_at,
profile_age_in_seconds: instance_of(Integer),
initiating_service_provider: initiating_service_provider.issuer,
which_letter: 1,
letter_count: 1,
submit_attempts: 1,
Expand Down Expand Up @@ -355,6 +362,7 @@
fraud_check_failed: true,
enqueued_at: user.pending_profile.gpo_confirmation_codes.last.code_sent_at,
profile_age_in_seconds: instance_of(Integer),
initiating_service_provider: initiating_service_provider.issuer,
which_letter: 1,
letter_count: 1,
submit_attempts: 1,
Expand Down