Sha256: 2881d6db57b6d7226d1b3437e06a679ee9c6ea75637242b0e93ffd3b8fd27e9b

Contents?: true

Size: 619 Bytes

Versions: 7

Compression:

Stored size: 619 Bytes

Contents

require 'tempfile'

module Ezid
  RSpec.describe BatchDownload, ezid: true do

    subject do
      a_week_ago = (Time.now - (7*24*60*60)).to_i
      described_class.new(:anvl, compression: "zip", permanence: "test", status: "public", createdAfter: a_week_ago)
    end

    specify {
      expect(subject.download_url).to match(/\Ahttps:\/\/ezid\.cdlib\.org\/download\/\w+\.zip\z/)
      expect(subject.url).to match(/\Ahttps:\/\/ezid\.cdlib\.org\/download\/\w+\.zip\z/)
      Dir.mktmpdir do |tmpdir|
        expect(subject.file(path: tmpdir))
          .to match(/\A#{tmpdir}\/\w+\.zip\z/)
      end
    }

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ezid-client-1.10.0 spec/integration/batch_download_spec.rb
ezid-client-1.9.4 spec/integration/batch_download_spec.rb
ezid-client-1.9.3 spec/integration/batch_download_spec.rb
ezid-client-1.9.2 spec/integration/batch_download_spec.rb
ezid-client-1.9.1 spec/integration/batch_download_spec.rb
ezid-client-1.9.0 spec/integration/batch_download_spec.rb
ezid-client-1.9.0.rc1 spec/integration/batch_download_spec.rb