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/services/idv/steps/selfie_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module Idv
module Steps
class SelfieStep < DocAuthBaseStep
def call
add_cost(:acuant_result) if get_results_response.to_h[:billed]
if get_results_response.success?
send_selfie_request
else
Expand Down
8 changes: 6 additions & 2 deletions spec/features/idv/doc_auth/selfie_step_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,23 @@

before do
allow(Figaro.env).to receive(:liveness_checking_enabled).and_return('true')
sign_in_and_2fa_user
@user = sign_in_and_2fa_user
complete_doc_auth_steps_before_ssn_step
end

it 'is on the correct page' do
expect(page).to have_current_path(idv_doc_auth_selfie_step)
end

it 'proceeds to the next page with valid info' do
it 'proceeds to the next page and logs a cost with valid info' do
proofing_cost = ProofingCost.find_by(user_id: @user.id)
count = proofing_cost.acuant_result_count

attach_image
click_idv_continue

expect(page).to have_current_path(idv_doc_auth_ssn_step)
expect(proofing_cost.reload.acuant_result_count).to eq(count + 1)
end

it 'restarts doc auth if the document cannot be authenticated' do
Expand Down