Sha256: 7d9f65f664d8742b9edc349c8ac7222f97dbdc5441fcb2b33da9259b310bf953

Contents?: true

Size: 871 Bytes

Versions: 3

Compression:

Stored size: 871 Bytes

Contents

describe Onfido::Report do
  subject(:report) { described_class.new }
  describe '#find' do
    it 'returns a report for an existing check' do
      report_id = '6951786-123123-422221'
      response = report.find(report_id)

      expect(response['id']).to eq(report_id)
    end
  end

  describe '#all' do
    it 'lists all reports for an existing check' do
      check_id = '8546921-123123-123123'
      response = report.all(check_id)

      expect(response['reports'].count).to eq(2)
    end
  end

  describe '#resume' do
    it 'returns a success response' do
      report_id = '6951786-123123-422221'

      expect { report.resume(report_id) }.not_to raise_error
    end
  end

  describe '#cancel' do
    it 'returns a success response' do
      report_id = '6951786-123123-422221'

      expect { report.cancel(report_id) }.not_to raise_error
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
onfido-1.1.1 spec/integrations/report_spec.rb
onfido-1.1.0 spec/integrations/report_spec.rb
onfido-1.0.0 spec/integrations/report_spec.rb