Sha256: e9682bba3aa07f82bf0368cba8ad2ace407be41a094efda00f04c1b881bb31f2

Contents?: true

Size: 1017 Bytes

Versions: 12

Compression:

Stored size: 1017 Bytes

Contents

describe Onfido::Report do
  subject(:report) { described_class.new }
  let(:check_id) { '8546921-123123-123123' }

  describe '#find' do
    let(:report_id) { '6951786-123123-422221' }

    it 'returns a report for an existing check' do
      response = report.find(check_id, report_id)
      expect(response['id']).to eq(report_id)
    end
  end

  describe '#all' do
    it 'lists all reports for an existing check' do
      response = report.all(check_id)
      expect(response['reports'].count).to eq(2)
    end
  end

  describe '#resume' do
    let(:report_id) { '6951786-123123-422221' }
    let(:check_id) { '1212121-123123-422221' }

    it 'returns a success response' do
      expect { report.resume(check_id, report_id) }.not_to raise_error
    end
  end

  describe '#cancel' do
    let(:report_id) { '6951786-123123-422221' }
    let(:check_id) { '1212121-123123-422221' }

    it 'returns a success response' do
      expect { report.cancel(check_id, report_id) }.not_to raise_error
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
onfido-0.15.1 spec/integrations/report_spec.rb
onfido-0.15.0 spec/integrations/report_spec.rb
onfido-0.14.0 spec/integrations/report_spec.rb
onfido-0.13.0 spec/integrations/report_spec.rb
onfido-0.12.0 spec/integrations/report_spec.rb
onfido-0.11.0 spec/integrations/report_spec.rb
onfido-0.10.0 spec/integrations/report_spec.rb
onfido-0.9.0 spec/integrations/report_spec.rb
onfido-0.8.4 spec/integrations/report_spec.rb
onfido-0.8.3 spec/integrations/report_spec.rb
onfido-0.8.2 spec/integrations/report_spec.rb
onfido-0.8.1 spec/integrations/report_spec.rb