Sha256: 114e93406b6553e851d84e96557042bf73a3237166bee85fc55d9f2f39cc487d

Contents?: true

Size: 533 Bytes

Versions: 10

Compression:

Stored size: 533 Bytes

Contents

require 'tempfile'

describe Onfido::LivePhoto do
  subject(:live_photo) { described_class.new }

  describe '#create' do
    after do
      file.close
      file.unlink
    end

    let(:file) { Tempfile.new(['photo', '.jpg']) }
    before { allow(live_photo).to receive(:open).and_return(:file) }
    let(:params) { { file: file } }
    let(:applicant_id) { '1030303-123123-123123' }

    it 'creates a new photo' do
      response = live_photo.create('foobar', params)
      expect(response['id']).not_to be_nil
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
onfido-0.8.4 spec/integrations/live_photo_spec.rb
onfido-0.8.3 spec/integrations/live_photo_spec.rb
onfido-0.8.2 spec/integrations/live_photo_spec.rb
onfido-0.8.1 spec/integrations/live_photo_spec.rb
onfido-0.7.1 spec/integrations/live_photo_spec.rb
onfido-0.7.0 spec/integrations/live_photo_spec.rb
onfido-0.6.1 spec/integrations/live_photo_spec.rb
onfido-0.6.0 spec/integrations/live_photo_spec.rb
onfido-0.5.0 spec/integrations/live_photo_spec.rb
onfido-0.4.0 spec/integrations/live_photo_spec.rb