Sha256: 93ae39d9c064985a6c9f5b2705b8558b8e85a84a03e493199d3adf86c1b41c54

Contents?: true

Size: 676 Bytes

Versions: 5

Compression:

Stored size: 676 Bytes

Contents

require 'spec_helper'

describe Lifen::Binary do

  describe ':download with right uuid' do

    let(:binary)           { Lifen::Binary.new(uuid: "valid_binary_id") }

    it 'works' do

      VCR.use_cassette "binary/download/valid" do
        expect(Digest::MD5.hexdigest(binary.download)).to eq("2285abb032c5e9054a518690b4701ab6")
      end
    end
  end

    describe ':download with right uuid' do

      let(:binary)           { Lifen::Binary.new(uuid: "wrong-binary-uuid") }

      it 'fails with wrong uuid' do

        VCR.use_cassette "binary/download/invalid" do
          expect{  binary.download }.to raise_error Lifen::Error
        end
      end

    end
  end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
lifen-fhir-0.1.0 spec/binary_spec.rb
lifen-3.0.0 spec/binary_spec.rb
lifen-2.4.0 spec/binary_spec.rb
lifen-2.3.0 spec/binary_spec.rb
lifen-2.2.0 spec/binary_spec.rb