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
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ def all_passed?
transaction_status_passed? &&
true_id_product.present? &&
product_status_passed? &&
doc_auth_result_passed?
doc_auth_result_passed? &&
(@liveness_checking_enabled ? selfie_success : true)
end

def selfie_result
Expand Down
7 changes: 3 additions & 4 deletions app/services/doc_auth/mock/result_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ def errors
# Error generator is not to be called when it's not failure
# allows us to test successful results
return {} if all_doc_capture_values_passing?(
doc_auth_result, id_type_supported?,
face_match_result
doc_auth_result, id_type_supported?
)

mock_args = {}
Expand Down Expand Up @@ -178,10 +177,10 @@ def doc_auth_result_from_success
end
end

def all_doc_capture_values_passing?(doc_auth_result, id_type_supported, face_match_result)
def all_doc_capture_values_passing?(doc_auth_result, id_type_supported)
doc_auth_result == 'Passed' &&
id_type_supported &&
(@selfie_check_performed ? face_match_result == 'Pass' : true)
(@selfie_check_performed ? selfie_success : true)
end

def parse_uri
Expand Down
Loading