Skip to content

Commit

Permalink
Add test case for document_with_address_information report
Browse files Browse the repository at this point in the history
  • Loading branch information
dvacca-onfido committed Nov 8, 2024
1 parent 8044311 commit bacac76
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions spec/integrations/report_schema_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,22 @@

expect(facial_similarity_report).to be_an_instance_of Onfido::FacialSimilarityPhotoReport
end

it 'schema of Document With Address Information report is valid' do
report_id = onfido_api.create_check(
Onfido::CheckBuilder.new(
applicant_id: applicant_id,
document_ids: [document_id],
report_names: [Onfido::ReportName::DOCUMENT_WITH_ADDRESS_INFORMATION],
)).report_ids[0]

report = repeat_request_until_status_changes(
Onfido::ReportStatus::COMPLETE
) { onfido_api.find_report(report_id) }

expect(report).to be_an_instance_of Onfido::DocumentWithAddressInformationReport
expect(report.properties.barcode).to be_an_instance_of Onfido::DocumentPropertiesBarcode
expect(report.properties.barcode.document_type).to eq("driving_licence")
end
end
end

0 comments on commit bacac76

Please sign in to comment.